Problemas ao configurar o roteamento de um endereço IP para uma interface de rede específica

0

Para um endereço IP (aaa.bb.cd) eu preciso conectar via eth1 não eth0 (que era o default e suponho que permanecesse um padrão, mas eu não acho que tenha sido depois que o eth1 foi adicionado).

Última regra que eu mesmo adicionei usando o comando route add -host 172.27.4.213 dev eth1 < - Estou achando que é incorreto.

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.0.1        0.0.0.0         UG    0      0        0 eth1
10.0.0.0        0.0.0.0         255.255.0.0     U     0      0        0 eth1
10.0.0.0        0.0.0.0         255.255.0.0     U     0      0        0 eth0
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
172.18.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-2eeb687f709e
172.19.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-0971950c62b2
172.20.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-c4f8472e3ea8
172.21.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-197f22a151b6
172.22.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-d1df5bfeb2d6
172.24.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-e00c82e13142
aaa.bb.c.d      0.0.0.0         255.255.255.255 UH    0      0        0 eth1

$ ip a show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:0c:29:b5:7d:7b brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.27/16 brd 10.0.255.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:feb5:7d7b/64 scope link 
       valid_lft forever preferred_lft forever

$ ip a show eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:0c:29:b5:7d:85 brd ff:ff:ff:ff:ff:ff
    inet 10.0.1.170/16 brd 10.0.255.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:feb5:7d85/64 scope link 
       valid_lft forever preferred_lft forever

/ etc / network / interfaces

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
    address 10.0.0.27
    netmask 255.255.0.0
    gateway 10.0.0.1
    dns-nameservers 10.0.0.2

auto eth1
allow-hotplug eth1
iface eth1 inet dhcp
    
por sebastian_t 13.04.2018 / 00:55

0 respostas