Página 1 de 1

Interfaces

Enviado: 14 Ago 2022, 02:18
por bernardino
Este tópico é continuação do Basic Configs.

Sequência: 02

1) Visualize as configurações das interfaces

NY_R1#show running-config | sec interface
interface GigabitEthernet0/0
no ip address
duplex auto
speed auto
shutdown
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
shutdown
interface FastEthernet0/0/0
switchport mode access
interface FastEthernet0/0/1
switchport mode access
interface FastEthernet0/0/2
switchport mode access
interface FastEthernet0/0/3
switchport mode access
interface Vlan1
no ip address
shutdown
NY_R1#

2) Veja outros detalhes das interfaces

NY_R1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 unassigned YES NVRAM administratively down down
GigabitEthernet0/1 unassigned YES NVRAM administratively down down
FastEthernet0/0/0 unassigned YES unset up down
FastEthernet0/0/1 unassigned YES unset up down
FastEthernet0/0/2 unassigned YES unset up down
FastEthernet0/0/3 unassigned YES unset up down
Vlan1 unassigned YES NVRAM administratively down down
NY_R1#

3) Veja mais informações de uma interface.

NY_R1#show interfaces gigabitEthernet 0/0

ou de todas as interfaces

NY_R1#show interfaces

4) Adicione um IP a interface

NY_R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
NY_R1(config)#interface gigabitEthernet 0/0
NY_R1(config-if)#ip address 192.168.10.1 255.255.255.0
NY_R1(config-if)#do show ip int bri
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 192.168.10.1 YES manual administratively down down
GigabitEthernet0/1 unassigned YES NVRAM administratively down down
FastEthernet0/0/0 unassigned YES unset up down
FastEthernet0/0/1 unassigned YES unset up down
FastEthernet0/0/2 unassigned YES unset up down
FastEthernet0/0/3 unassigned YES unset up down
Vlan1 unassigned YES NVRAM administratively down down
NY_R1(config-if)#

5) Adicione endereço IP a outra interface.

NY_R1(config-if)#exit
NY_R1(config)#interface gigabitEthernet 0/1
NY_R1(config-if)#ip address 192.168.20.1 255.255.255.0
NY_R1(config-if)#do show ip int bri
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 192.168.10.1 YES manual administratively down down
GigabitEthernet0/1 192.168.20.1 YES manual administratively down down
FastEthernet0/0/0 unassigned YES unset up down
FastEthernet0/0/1 unassigned YES unset up down
FastEthernet0/0/2 unassigned YES unset up down
FastEthernet0/0/3 unassigned YES unset up down
Vlan1 unassigned YES NVRAM administratively down down

6) As interfaces estão com status administratively down down. Vamos remover o shutdown das interfaces.

Aproveite para conectar as interfaces g0/0-1, a um switch. Para que elas alterem o status para UP. Afinal, é necessário que haja conexão física.

Pode usar um Switch 2960.

NY_R1(config-if)#do show run | sec inter
interface GigabitEthernet0/0
ip address 192.168.10.1 255.255.255.0
duplex auto
speed auto
shutdown
interface GigabitEthernet0/1
ip address 192.168.20.1 255.255.255.0
duplex auto
speed auto
shutdown

NY_R1(config-if)#no shutdown
NY_R1(config-if)#%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up
exit
NY_R1(config)#interface gigabitEthernet 0/0
NY_R1(config-if)#no shutdown
NY_R1(config-if)#%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

NY_R1(config-if)#do show run | sec inter
interface GigabitEthernet0/0
ip address 192.168.10.1 255.255.255.0
duplex auto
speed auto
interface GigabitEthernet0/1
ip address 192.168.20.1 255.255.255.0
duplex auto
speed auto
interface FastEthernet0/0/0
switchport mode access
interface FastEthernet0/0/1
switchport mode access
interface FastEthernet0/0/2
switchport mode access
interface FastEthernet0/0/3
switchport mode access
interface Vlan1
no ip address
shutdown
NY_R1(config-if)#

7) Execute um teste de ping e certifique, que a interface esteja UP.

NY_R1#ping 192.168.10.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/4/12 ms

NY_R1#ping 192.168.20.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.20.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/4/10 ms

NY_R1#

Este exercício continua em Conectividade