View previous topic :: View next topic |
Author |
Message |
Xamindar Veteran
Joined: 03 Oct 2004 Posts: 1155 Location: California
|
Posted: Tue Nov 20, 2007 7:02 am Post subject: virtual interfaces doesn't work "the gentoo way"?! |
|
|
I added the following to my net file to configure my eth1 interface with the following three subnets:
Code: | config_eth1=(
"172.16.0.1/26" # My personal subnet
"172.16.0.65/26" #room mate subnet
"172.16.0.129/25" #DHCP subnet
)
|
But checking ifconfig I do not have any eth1.0, eth1.1, or eth1.2. Just eth1 with the settings of the first subnet I specified. This is the way the example file says to do it and it's not working. Anyone know why?
This is the output of the net.eth1 restart. Looks like it is doing something with them:
Code: | /etc/init.d/net.eth1 restart
* Stopping eth1
* Bringing down eth1
* Shutting down eth1 ... [ ok ]
* Starting eth1
* Bringing up eth1
* 172.16.0.1/26 [ ok ]
* 172.16.0.65/26 [ ok ]
* 172.16.0.129/25 [ ok ]
queen-of-hearts xamindar #
|
I did some more testing and it looks like the interface did get all those ip addresses but a serious problem. They aren't subnetted. If I set another computer that is connected to that interface to a valid IP I am able to ssh into the box from any of the three ips I gave it instead of the one in the subnet I am in. So instead of it separating the three subnets like it should it is allowing them all to be mixed together. It doesn't make sense. I have those subnet masks for a reason.
And finally, I want to have dhcp give out ips based on mac address for the first two subnets and use the third one for a pool if the mac address isn't listed. But dhcpd fails to start in this configuration:
Code: | queen-of-hearts dhcp # cat dhcpd.conf
# option definitions common to all supported networks...
ddns-update-style ad-hoc;
option domain-name "hsd1.ca.comcast.net";
option domain-name-servers 68.87.76.178, 68.87.78.130;
authoritative;
subnet 172.16.0.128 netmask 255.255.255.128 {
range 172.16.0.130 172.16.0.254;
option domain-name "radnimax.com";
option routers 172.16.0.129;
option ip-forwarding off;
option broadcast-address 172.16.0.255;
default-lease-time 86400;
max-lease-time 86400;
}
subnet 172.16.0.0 netmask 255.255.255.192 {
}
subnet 172.16.0.64 netmask 255.255.255.192 {
}
#Static setting IP
host white-rabbit{
hardware ethernet 00:18:F3:7C:CD:BE;
fixed-address 172.16.0.2;
}
host white-rabbit2{
hardware ethernet 00:15:C5:BC:24:94;
fixed-address 172.16.0.3;
}
#host your-4dacd0ea75{
# hardware ethernet 00:17:31:11:2f:10;
# fixed-address 192.168.2.32;
#}
host TWEEDLE-DEE {
hardware ethernet 00:01:fb:00:04:eb;
fixed-address 172.16.0.6;
}
host takaki {
hardware ethernet 00:11:5b:5d:cc:2b;
fixed-address 172.16.0.66;
}
host yong-jun {
hardware ethernet 00:01:4a:06:0f:2b;
fixed-address 172.16.0.67;
}
host yong-jun2 {
hardware ethernet 00:18:f3:7c:cd:be;
fixed-address 172.16.0.68;
}
|
|
|
Back to top |
|
|
Dumble n00b
Joined: 31 Aug 2006 Posts: 70
|
Posted: Tue Nov 20, 2007 4:42 pm Post subject: |
|
|
If you use iproute2 to configure your interfaces, it does not create virtual devices. You must use /sbin/ip to see your others IP :
_________________ Eternity is a very long time, especially towards the end... (S. Hawking) |
|
Back to top |
|
|
Xamindar Veteran
Joined: 03 Oct 2004 Posts: 1155 Location: California
|
Posted: Tue Nov 20, 2007 8:04 pm Post subject: |
|
|
Dumble wrote: | If you use iproute2 to configure your interfaces, it does not create virtual devices. You must use /sbin/ip to see your others IP :
|
Then how do I create virtual devices? The gentoo howto I found tells me to do it the way I did. So obviously the gentoo howto is wrong.
Thanks for the info though. I can see the ips it has with that command. |
|
Back to top |
|
|
Xamindar Veteran
Joined: 03 Oct 2004 Posts: 1155 Location: California
|
Posted: Wed Nov 21, 2007 9:12 am Post subject: |
|
|
I take it by the lack of responses that this is not something that can not be done any more. Maybe it is not something that I should be doing anyway. |
|
Back to top |
|
|
desultory Bodhisattva
Joined: 04 Nov 2005 Posts: 9410
|
Posted: Wed Nov 21, 2007 10:46 am Post subject: |
|
|
Xamindar wrote: | The gentoo howto I found tells me to do it the way I did. So obviously the gentoo howto is wrong. | Please post a link to it. |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Wed Nov 21, 2007 4:04 pm Post subject: |
|
|
Xamindar wrote: | Then how do I create virtual devices? The gentoo howto I found tells me to do it the way I did. So obviously the gentoo howto is wrong.
Thanks for the info though. I can see the ips it has with that command. |
You've not created a virtual interface, you've created an alias to it.
Technically there is no difference between an aliased interface and an interface with >1 address.
If you want to have your aliased interfaces, simpy set modules="ifconfig" in /etc/conf.d/net _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
|
|