You are not logged in.
Hello!
I have got the following problem on my workstation. I'm getting IP via DHCP but it does not set proper default gateway. So, every time I boot my machine I have to run the following:
sudo route add default gw 192.168.234.254
Is there any way to make it automatically on network start? Btw, I'm using the following netcfg profile:
CONNECTION='ethernet'
DESCRIPTION='A basic dhcp ethernet connection using iproute'
INTERFACE='eth0'
IP='dhcp'
I've tried to append the line to network profile:
IPCFG=('route add default gw 192.168.234.254')
but got an error:
Error: either "to" is duplicate, or "gw" is a garbage.
> Could not configure interface (route add default gw 192.168.234.254).
Thanks.
Last edited by pshevtsov (2011-07-12 08:12:30)
Offline
You need to look at why you're not getting the default gateway set via dhcp - workarounds as above are not solutions.
If you run dhcpcd manually, do you get the right gateway?
Offline
You need to look at why you're not getting the default gateway set via dhcp - workarounds as above are not solutions.
If you run dhcpcd manually, do you get the right gateway?
I've already asked our office's sysadmin but he has not got any solution yet.
If I run dhcpcd manually I do not get the right gateway either.
Offline
Wouldn't DHCP_OPTIONS="-G 192.168.234.254" in your Netcfg profile do the trick?
Offline
tomk wrote:You need to look at why you're not getting the default gateway set via dhcp - workarounds as above are not solutions.
If you run dhcpcd manually, do you get the right gateway?
I've already asked our office's sysadmin but he has not got any solution yet.
If I run dhcpcd manually I do not get the right gateway either.
What does netstat -rn say? FWIW, with a setup as simple as yours, I would blame the router you are getting an IP from...
Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd
Offline
Wouldn't DHCP_OPTIONS="-G 192.168.234.254" in your Netcfg profile do the trick?
Still no luck
What does netstat -rn say?
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.0.0.0 192.168.234.254 255.240.0.0 UG 0 0 0 eth0
10.192.0.0 192.168.234.254 255.240.0.0 UG 0 0 0 eth0
85.118.224.0 192.168.234.254 255.255.248.0 UG 0 0 0 eth0
89.31.112.0 192.168.234.254 255.255.248.0 UG 0 0 0 eth0
93.92.216.0 192.168.234.254 255.255.248.0 UG 0 0 0 eth0
172.16.0.0 192.168.234.254 255.240.0.0 UG 0 0 0 eth0
192.168.234.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
193.124.208.0 192.168.234.254 255.255.255.0 UG 0 0 0 eth0
212.192.164.0 192.168.234.254 255.255.255.0 UG 0 0 0 eth0
Offline
Cool, but I meant before you set up the route manually...
Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd
Offline
Cool, but I meant before you set up the route manually...
But this is the output before I set up the route. After I set up the route netstat outputs the following:
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.234.254 0.0.0.0 UG 0 0 0 eth0
10.0.0.0 192.168.234.254 255.240.0.0 UG 0 0 0 eth0
10.192.0.0 192.168.234.254 255.240.0.0 UG 0 0 0 eth0
85.118.224.0 192.168.234.254 255.255.248.0 UG 0 0 0 eth0
89.31.112.0 192.168.234.254 255.255.248.0 UG 0 0 0 eth0
93.92.216.0 192.168.234.254 255.255.248.0 UG 0 0 0 eth0
172.16.0.0 192.168.234.254 255.240.0.0 UG 0 0 0 eth0
192.168.234.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
193.124.208.0 192.168.234.254 255.255.255.0 UG 0 0 0 eth0
212.192.164.0 192.168.234.254 255.255.255.0 UG 0 0 0 eth0
Offline
Solved! Added the following line to my netcfg profile:
POST_UP='route add default gw 192.168.234.254'
Last edited by pshevtsov (2011-07-12 08:12:13)
Offline