###### tags: `RCOM` # Lab 4 - Configurar assim: __Router Switch__: Porta 0 [router] => Porta 10 [switch] __Router Internet__: Porta 1 [router] __Router ip inner__: 172.16.61.254 (172.16.y1.254/24) __Router ip outer__: 172.16.1.69 (172.16.1.69/24) ## 1) Reconfigurar router [switch] ```bash copy flash::tux6-clean startup-config reload ``` ## 1.2) Adicionar porta a lan 1 [switch] ```bash configure terminal interface fastethernet 0/10 switchport mode access switchport access vlan 61 end ``` ## 1.3) Configurar ip do router [router] ->tentar pular Nao esquecer de dar reset no router antes de comecar. __Porta da lan__: ``` configure terminal interface gigabitethernet 0/0 ip address 172.16.61.254 255.255.255.0 no shutdown exit ``` __Porta da internet__: ``` configure terminal interface gigabitethernet 0/1 ip address 172.16.1.69 255.255.255.0 no shutdown exit ``` ## 2) Default routers ### 2.1) Terminal - __TUX3__: tux64 como default route. ``` route add default gw 172.16.60.254 ``` - __TUX2__: Rc como default route. ```bash route add default gw 172.16.61.254 ``` - __TUX4__: Rc como default route. ```bash route add default gw 172.16.61.254 ``` ### 2.2) GKTERM __Routes for 172.16.y0.0/24 in tuxy62 and Rc.__ _Pela experiencia 3 já há rotas do tux62 para a lan 1._ Temos de adicionar no Rc. ```bash route ip 172.16.60.0 255.255.255.0 172.16.61.253 ``` ## 4) Configurar NAT ``` conf t interface gigabitethernet 0/0 ip address 172.16.61.254 255.255.255.0 no shutdown ip nat inside exit interface gigabitethernet 0/1 ip address 172.16.1.69 255.255.255.0 no shutdown ip nat outside exit ip nat pool ovrld 172.16.1.69 172.16.1.69 prefix 24 ip nat inside source list 1 pool ovrld overload access-list 1 permit 172.16.60.0 0.0.0.7 access-list 1 permit 172.16.61.0 0.0.0.7 ip route 0.0.0.0 0.0.0.0 172.16.1.254 ip route 172.16.y0.0 255.255.255.0 172.16.y1.253 end ``` # DNS ``` search netlab.fe.up.pt fe.up.pt nameserver 172.16.1.1 nameserver 193.136.28.10 ```