You are not logged in.
one machine with arch linux and with two NICs (this is done in virtualbox guest OS):
one NIC (enp0s3) is in 192.168.56.0/24 network with static IP and no Internet connection, while the other one (enp0s8) is set to use DHCP from the host network, the TCP/IP informatio changes with the network it is in, with Internet connection.
Here is the current setting for enp0s3:
# cat /etc/netctl/enp0s3
Description='A basic static ethernet connection'
Interface=enp0s3
Connection=ethernet
IP=static
Address=('192.168.56.10/24')
#Routes=('192.168.56.0/24 via 192.168.1.2')
Gateway='192.168.56.1'
#DNS=('192.168.56.1')
## For IPv6 autoconfiguration
#IP6=stateless
## For IPv6 static address configuration
#IP6=static
#Address6=('1234:5678:9abc:def::1/64' '1234:3456::123/96')
#Routes6=('abcd::1234')
#Gateway6='1234:0:123::abcd'
current `ip addr` output:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08:00:27:b6:e6:d0 brd ff:ff:ff:ff:ff:ff
inet 192.168.56.10/24 brd 192.168.56.255 scope global enp0s3
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:feb6:e6d0/64 scope link
valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08:00:27:dd:b4:db brd ff:ff:ff:ff:ff:ff
inet 192.168.1.132/24 brd 192.168.1.255 scope global enp0s8
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fedd:b4db/64 scope link
valid_lft forever preferred_lft forever
How do I set the route so that the system can use enp0s3 for network traffic that is within the 192.168.56.0 network, while all the other traffic goes through enp0s8? Thanks.
Last edited by teetee1 (2013-09-21 00:32:30)
Offline
Remove Gateway='192.168.56.1' from /etc/netctl/enp0s3 so the gateway from the DHCP lease on enp0s8 will be the default gateway.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Thanks. It was exactly like you said! It's now working!
Last edited by teetee1 (2013-09-21 00:32:04)
Offline