Routing

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

ROUTING

Router1

10.0.0.1/24

10.0.0.1/24

eth1

Router2

eth1

172.30.104.1
eth0

192.168.0.1/24
eth0

Cliente1

Cliente2

172.30.104.2/24

192.168.0.2/24

Configuraciones
Cliente 1

Cliente 2

DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=172.30.104.2
NETMASK=255.255.255.0
GATEWAY=172.30.104.1

DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.0.2
NETMASK=255.255.255.0
GATEWAY=192.168.0.1

Router1
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=172.30.104.1
NETMASK=255.255.255.0

DEVICE=eth1
BOOTPROTO=static
ONBOOT=yes
IPADDR=10.0.0.1
NETMASK=255.255.255.0

Activamos el ip_forward
[root@localhost ~]# vi /etc/sysctl.conf
# Controls IP packet forwarding
net.ipv4.ip_forward = 1

Aadimos la ruta esttica


[root@localhost ~]# route add -net 192.168.0.0 netmask 255.255.255.0 gw 10.0.0.2 eth1
o
Creamos de forma permanente la ruta
[root@localhost ~]# vi /etc/sysconfig/network-scripts/route-eth1
GATEWAY0=10.0.0.2
ADDRESS0=192.168.0.0
NETMASK0=255.255.255.0

Router2
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.0.1
NETMASK=255.255.255.0

DEVICE=eth1
BOOTPROTO=static
ONBOOT=yes
IPADDR=10.0.0.2
NETMASK=255.255.255.0

Activamos el ip_forward
[root@localhost ~]# vi /etc/sysctl.conf
# Controls IP packet forwarding
net.ipv4.ip_forward = 1

Aadimos la ruta esttica


[root@localhost ~]# route add -net 172.30.104.0 netmask 255.255.255.0 gw 10.0.0.1 eth1
o
Creamos de forma permanente la ruta
[root@localhost ~]# vi /etc/sysconfig/network-scripts/route-eth1
GATEWAY0=10.0.0.1
ADDRESS0=172.30.104.0
NETMASK0=255.255.255.0

You might also like