LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Ubuntu 8.04 LTS gateway problems (https://www.linuxquestions.org/questions/ubuntu-63/ubuntu-8-04-lts-gateway-problems-901304/)

c0mputerking 09-05-2011 07:07 PM

Ubuntu 8.04 LTS gateway problems
 
8.04 LTS Default gateway problems

When my machine boots my route command looks like below, and I can ping my gateway, but not the Internet.

Destination Gateway Genmask Flags Metric Ref Use Iface
xxx.xxx.xxx.128 * 255.255.255.224 U 0 0 0 eth0

The only way i can get to the Internet is to manually run route add default gw xxx.xxx.xxx.129 after which my route looks like this.

Destination Gateway Genmask Flags Metric Ref Use Iface
204.244.122.128 * 255.255.255.224 U 0 0 0 eth0
default 204.244.122.129 0.0.0.0 UG 0 0 0 eth0

However in my /etc/network/interfaces I clearly have my gateway defined as xxx.xxx.xxx.129

# The loopback network interface
auto lo eth0
iface lo inet loopback

# The primary network interface
iface eth0 inet static
address xxx.xxx.xxx.132
netmask 255.255.255.224
broadcast xxx.xxx.xxx.159
network xxx.xxx.xxx.128
gateway xxx.xxx.xxx.129
# up route add default gw 204.244.122.129

Also when i do a /etc/init.d/networking restart i get some
errors but Internet access continues to work see below.

* Reconfiguring network interfaces... Moving from lan,netstart to if-pre-up,eth0,lan
SIOCADDRT: No such process
Failed to bring up eth0.

Please help as this machine is located in a datacenter so access is limited

Larry James 09-06-2011 09:10 AM

Quote:

Originally Posted by c0mputerking (Post 4462407)
8.04 LTS Default gateway problems

When my machine boots my route command looks like below, and I can ping my gateway, but not the Internet.

Destination Gateway Genmask Flags Metric Ref Use Iface
xxx.xxx.xxx.128 * 255.255.255.224 U 0 0 0 eth0

The only way i can get to the Internet is to manually run route add default gw xxx.xxx.xxx.129 after which my route looks like this.

Destination Gateway Genmask Flags Metric Ref Use Iface
204.244.122.128 * 255.255.255.224 U 0 0 0 eth0
default 204.244.122.129 0.0.0.0 UG 0 0 0 eth0

However in my /etc/network/interfaces I clearly have my gateway defined as xxx.xxx.xxx.129

# The loopback network interface
auto lo eth0
iface lo inet loopback

# The primary network interface
iface eth0 inet static
address xxx.xxx.xxx.132
netmask 255.255.255.224
broadcast xxx.xxx.xxx.159
network xxx.xxx.xxx.128
gateway xxx.xxx.xxx.129
# up route add default gw 204.244.122.129

Also when i do a /etc/init.d/networking restart i get some
errors but Internet access continues to work see below.

* Reconfiguring network interfaces... Moving from lan,netstart to if-pre-up,eth0,lan
SIOCADDRT: No such process
Failed to bring up eth0.

Please help as this machine is located in a datacenter so access is limited

First your lack of using code tags makes your message hard to read. An output of ifconfig (using code tags) would help us a lot in identifying what's happening after you boot. Another ifconfig (between code tags) would be nice if we can see how it looks after you manually get the network up and running.

A complete route output between code tags would help also. You only show two lines. Maybe two lines are all that you get. But it'd appear somewhat more complete and identifiable if your output at least included the first line header.

Your /etc/network/interfaces configuration probably isn't being activated because you have a missing "auto eth0". That might be the only problem.

-- L. James

--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames

c0mputerking 09-07-2011 06:06 PM

Thank you for your reply and advice about code tags too here are the additional infos in the format that you have requested.

This is the complete output of the route and ifconfig commands respectively these have not been truncated there are only 2 lines in my routing table. NOTE this is while the system is working after running the manual
# add route default gw 204.244.122.129 command

Code:

Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
204.244.122.128 *              255.255.255.224 U    0      0        0 eth0
default        204.244.122.129 0.0.0.0        UG    0      0        0 eth0

Code:

th0      Link encap:Ethernet  HWaddr 00:0b:db:93:30:1b 
          inet addr:204.244.122.132  Bcast:204.244.122.159  Mask:255.255.255.224
          inet6 addr: fe80::20b:dbff:fe93:301b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1482082 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1651637 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:437431175 (417.1 MB)  TX bytes:1083362330 (1.0 GB)
          Interrupt:16

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:4336425 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4336425 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1271201428 (1.1 GB)  TX bytes:1271201428 (1.1 GB)

The output of my ifconfig and route command while the system is not working is more difficult as it is remote and i have no copy paste capabilities while the network is down. However i have done my best to capture this information below as far as i can tell the ifconfig is the same as is the first and only line in the routing table.

Code:

Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
204.244.122.128 *              255.255.255.224 U    0    0        0 eth0

Code:

eth0      Link encap:Ethernet  HWaddr 00:0b:db:93:30:1b 
          inet addr:204.244.122.132  Bcast:204.244.122.159  Mask:255.255.255.224
          inet6 addr: fe80::20b:dbff:fe93:301b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7039 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4409 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1208479 (1.1 MB)  TX bytes:3671612 (3.5 MB)
          Interrupt:18

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:25790 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25790 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:12047856 (11.4 MB)  TX bytes:12047856 (11.4 MB)

Also my interfaces file did have an entry for auto eth0 however it was at the top of the file after auto lo. I have since moved it to the more conventional location again see the code below.

Code:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address 204.244.122.132
        netmask 255.255.255.224
        broadcast 204.244.122.159
        network 204.244.122.128
        gateway 204.144.122.129
#        metric 100
#      network 204.244.122.0
#      broadcast 204.244.122.255
#        up route add default gw 204.244.122.129
#up route add -net 172.20.11.0/16 gw 172.20.10.254 dev eth1
#not sure if i need these as i host my own and the should be edited /etc/
#      dnsnameservers 8.8.8.8
#      dnsnameservers 8.8.4.4

PS just some additional information my ISP for this server is using vlans and the system works perfectly with a windows based test laptop set to the same static ip/gateway as above.

c0mputerking 09-13-2011 04:43 PM

I am still having gateway problems, and have tried messing with lots of settings including metrics. Nothing seems to work someone has to be able to help me out here? Please ?

Quote:

Originally Posted by c0mputerking (Post 4464329)
Thank you for your reply and advice about code tags too here are the additional infos in the format that you have requested.

This is the complete output of the route and ifconfig commands respectively these have not been truncated there are only 2 lines in my routing table. NOTE this is while the system is working after running the manual
# add route default gw 204.244.122.129 command

Code:

Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
204.244.122.128 *              255.255.255.224 U    0      0        0 eth0
default        204.244.122.129 0.0.0.0        UG    0      0        0 eth0

Code:

th0      Link encap:Ethernet  HWaddr 00:0b:db:93:30:1b 
          inet addr:204.244.122.132  Bcast:204.244.122.159  Mask:255.255.255.224
          inet6 addr: fe80::20b:dbff:fe93:301b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1482082 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1651637 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:437431175 (417.1 MB)  TX bytes:1083362330 (1.0 GB)
          Interrupt:16

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:4336425 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4336425 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1271201428 (1.1 GB)  TX bytes:1271201428 (1.1 GB)

The output of my ifconfig and route command while the system is not working is more difficult as it is remote and i have no copy paste capabilities while the network is down. However i have done my best to capture this information below as far as i can tell the ifconfig is the same as is the first and only line in the routing table.

Code:

Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
204.244.122.128 *              255.255.255.224 U    0    0        0 eth0

Code:

eth0      Link encap:Ethernet  HWaddr 00:0b:db:93:30:1b 
          inet addr:204.244.122.132  Bcast:204.244.122.159  Mask:255.255.255.224
          inet6 addr: fe80::20b:dbff:fe93:301b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7039 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4409 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1208479 (1.1 MB)  TX bytes:3671612 (3.5 MB)
          Interrupt:18

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:25790 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25790 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:12047856 (11.4 MB)  TX bytes:12047856 (11.4 MB)

Also my interfaces file did have an entry for auto eth0 however it was at the top of the file after auto lo. I have since moved it to the more conventional location again see the code below.

Code:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address 204.244.122.132
        netmask 255.255.255.224
        broadcast 204.244.122.159
        network 204.244.122.128
        gateway 204.144.122.129
#        metric 100
#      network 204.244.122.0
#      broadcast 204.244.122.255
#        up route add default gw 204.244.122.129
#up route add -net 172.20.11.0/16 gw 172.20.10.254 dev eth1
#not sure if i need these as i host my own and the should be edited /etc/
#      dnsnameservers 8.8.8.8
#      dnsnameservers 8.8.4.4

PS just some additional information my ISP for this server is using vlans and the system works perfectly with a windows based test laptop set to the same static ip/gateway as above.



All times are GMT -5. The time now is 12:16 PM.