Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dhcp with macvlan ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Gregoire
Apprentice
Apprentice


Joined: 15 Apr 2006
Posts: 292

PostPosted: Fri Nov 02, 2012 1:26 pm    Post subject: dhcp with macvlan ? Reply with quote

Hello,

my ISP gave me 3 public IP, I use one for a router that's connected to my PC on eth1 and one other on my PC with eth0.

I would like to use the third one also on eth0 and put a proxy (for example nylond) with it.

My current /etc/conf.d/net
Code:

config_eth1=( "192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255" )
modules=("dhcpcd")
dhcp="nontp nonis"
config_eth0=( "dhcp" )
dhcpcd_eth0="-L -t 0"
macvlan_macvlan0="eth0"
mode_macvlan0="vepa"
mac_macvlan0="HERE I GIVE A VALID MAC DIFFERENT FROM ETH0..."
config_macvlan0=( "dhcp" )
dhcpcd_macvlan0="-L -t 0 -G -h penguin2"
dhcp_macvlan0="nontp nonis nodns"

And I have :
Code:

ll /etc/init.d/net*
lrwxrwxrwx 1 root root    6 Apr 17  2008 /etc/init.d/net.eth0 -> net.lo
lrwxrwxrwx 1 root root    6 Dec 26  2009 /etc/init.d/net.eth1 -> net.lo
-rwxr-xr-x 1 root root  17K Oct 23 10:19 /etc/init.d/net.lo
lrwxrwxrwx 1 root root    6 Dec 26  2009 /etc/init.d/net.macvlan0 -> net.lo
-rwxr-xr-x 1 root root 1.6K Oct 23 10:19 /etc/init.d/netmount

For a reason I don't understand just after boot I got :
Code:

ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet n.m.p.q  netmask 255.255.254.0  broadcast 255.255.255.255
        ether xx:xx:...  txqueuelen 1000  (Ethernet)
        RX packets 218645  bytes 288876102 (275.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 125035  bytes 11454548 (10.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 17 

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.2  netmask 255.255.255.0  broadcast 192.168.1.255
        ether xx:xx:...  txqueuelen 1000  (Ethernet)
        RX packets 81069  bytes 80671870 (76.9 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 64676  bytes 4156018 (3.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 19 

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 16436
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 0  (Local Loopback)
        RX packets 1913  bytes 367714 (359.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1913  bytes 367714 (359.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

macvlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether xx:yy:..  txqueuelen 0  (Ethernet)
        RX packets 306  bytes 18360 (17.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

And
Code:

ps aux|grep dhc
root      3266  0.0  0.0   8556   360 ?        Ss   13:36   0:00 dhcpcd -L -t 0 -C ntp.conf -C yp.conf -m 2 eth0

Which seems to be only run for eth0.

Any idea on what I should change for having dhcp also for macvlan0 ?

Thank you very much !
Back to top
View user's profile Send private message
MacGyver031
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2004
Posts: 140
Location: Ilavalai, Sri Lanka

PostPosted: Mon Nov 05, 2012 5:52 am    Post subject: Reply with quote

Hi,
I am not familiar with "macvlan", but short reading makes me believe that you should create two macvlans to achieve what you are looking for. I think that as soon as you assign the kernel-tcp-stack, the macvlan-tcp-stack is unable to "bind" on eth0.

BR.
_________________
Sincerely your
Joanand K.

MacBook Pro 5.1: 2.4GHz Core2 Duo, 4096MB, 500GB, NVidia 9400/9600 M GT
Gentoo, Kernel 3.4.9, XOrg, Fluxbox.
Back to top
View user's profile Send private message
Gregoire
Apprentice
Apprentice


Joined: 15 Apr 2006
Posts: 292

PostPosted: Mon Nov 05, 2012 2:10 pm    Post subject: Reply with quote

I have also tried with two macvlans, but without any change.

Thank for your answer :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum