|
||||||||
|
|
#1
|
|
Hi Guys,
I have 2 linux box(boxA and boxB), both have 2 net cards . I set the eth0 as 207.x.x.y (static IP from DSL) set the eth1 as 192.168.1.1 when I use "route" command, boxA is OK, I get the following result --------- Destination Gateway Genmask Flags Metric Ref Use Iface 207.x.x.0 * 255.255.255.0 U 0 0 0 eth0 localnet * 255.255.255.0 U 0 0 0 eth1 loopback * 255.0.0.0 U 0 0 0 lo default adsl-207-x-x 0.0.0.0 UG 0 0 0 eth0 ----------- But box B is wrong.( I do not connect these 2 boxes to internet at the same time, I compared these resluts separatedly ) I get the following strange result (1) I did not set any thing related to 169.254, why I got it? (2)the default is more strange. ---------------------------- Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 207.x.x.0 * 255.255.255.0 U 0 0 0 eth0 192.168.1.0 * 255.255.255.0 U 0 0 0 eth1 169.254.0.0 * 255.255.0.0 U 0 0 0 eth1 127.0.0.0 * 255.0.0.0 U 0 0 0 lo default 192.168.1.1 0.0.0.0 UG 0 0 0 eth1 ---------------------------- who can tell me what's wrong I did on my BoxB? Thank you in advance!! Bob Bob |
|
#2
|
|||
|
|||
|
> I get the following strange result
> (1) I did not set any thing related to 169.254, why I got it? 169.254.0.0-169.254.255.255 is a range of private IP addresses that Microsoft OSes use to assign adresses to interfaces that are configured for DHCP but were for some reason unable to get an address from a DHCP server. I have heard that some Linux distros have started to implement that behavior as well. So you might have a stale configuration lying around that tries to configure eth1 through DHCP, fails and then adds the corresponding network to the routing table. Then later the interface is configured again (this time the way you want it to) and you end up with two entries in the routing table. Of course I'm only making wild (but hopefully educated) guesses but I think tracing back your startup sequence to spot configuration problems might be worth a try. > (2)the default is more strange. > default 192.168.1.1 0.0.0.0 UG 0 0 0 eth1 This confirms that the system may have been configured for residing on a LAN, with DHCP and a gateway on the local network. Do the tools you use to configure your network reflect the parameters the way you want them? If yes, how to check and fix the configuration really depends on the distro you're using. Joerg -- OpenPGP: D14F 2782 1276 EBB4 E4E3 0BF1 838D DD4C EB56 1C99 |
|
#3
|
|||
|
|||
|
"Bob" <(E-Mail Removed)> wrote in message news:<tvkYb.1788$_(E-Mail Removed)>...
> Hi Guys, > > I have 2 linux box(boxA and boxB), both have 2 net cards . > > I set the eth0 as 207.x.x.y (static IP from DSL) > set the eth1 as 192.168.1.1 > > when I use "route" command, > > boxA is OK, I get the following result > > --------- > Destination Gateway Genmask Flags Metric Ref Use Iface > 207.x.x.0 * 255.255.255.0 U 0 0 0 eth0 > localnet * 255.255.255.0 U 0 0 0 eth1 > loopback * 255.0.0.0 U 0 0 0 lo > default adsl-207-x-x 0.0.0.0 UG 0 0 0 eth0 > ----------- > > But box B is wrong.( I do not connect these 2 boxes to internet > at the same time, I compared these resluts separatedly ) > > I get the following strange result > > (1) I did not set any thing related to 169.254, why I got it? > > (2)the default is more strange. > ---------------------------- > Kernel IP routing table > Destination Gateway Genmask Flags Metric Ref Use Iface > 207.x.x.0 * 255.255.255.0 U 0 0 0 eth0 > 192.168.1.0 * 255.255.255.0 U 0 0 0 eth1 > 169.254.0.0 * 255.255.0.0 U 0 0 0 eth1 > 127.0.0.0 * 255.0.0.0 U 0 0 0 lo > default 192.168.1.1 0.0.0.0 UG 0 0 0 eth1 > ---------------------------- > > who can tell me what's wrong I did on my BoxB? > > Thank you in advance!! > > Bob I had this same exact problem. After some digging around on the net (and through the initialization scripts) I came up with this -- On Red Hat 9 in the /etc/sysconfig/network-scripts/ifup there is a line that looks for the variable NOZEROCONF in the individual ifcfg-* files. If it is missing, the system will add the route 169.254.0.0 to the routing table. Look up zeroconf on google, and you'll see that it's supposed to make it easy for computers to communicate over a network when there is no DHCP to assign addresses. Anyway, I suggest editing ALL of your /etc/sysconfig/network-scripts/ifcfg-* files (where * is eth0, eth1, lo, etc) and adding a new line that reads NOZEROCONF=yes That will ensure that when your network comes up, you won't get that route in your tables. It worked for me. You can also delete the route without affecting anything. Brett |
![]() |
| Tags |
| route, strange, table |
| Thread Tools | |
| Display Modes | |
|
|