0% found this document useful (0 votes)
14 views10 pages

Ospf

The document outlines the configuration steps for various network devices, including switches and routers, focusing on VLAN setups and OSPF routing. It details commands for setting hostnames, configuring VLANs, enabling DHCP, and establishing trunking on interfaces. The configurations are organized by device, with specific IP addresses and subnet masks assigned to each VLAN.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views10 pages

Ospf

The document outlines the configuration steps for various network devices, including switches and routers, focusing on VLAN setups and OSPF routing. It details commands for setting hostnames, configuring VLANs, enabling DHCP, and establishing trunking on interfaces. The configurations are organized by device, with specific IP addresses and subnet masks assigned to each VLAN.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

04112024 - OSPF

TO

Switch>enable
Switch#clock set 10:00:00 04 november 2024
Switch#configure temrinal
^
% Invalid input detected at '^' marker.

Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname SWTO
SWTO(config)#banner motd "Equipamento Monitorado"
SWTO(config)#service password-encrypted
^
% Invalid input detected at '^' marker.

SWTO(config)#service password-
SWTO(config)#service password-encryption
SWTO(config)#enable secret redes
SWTO(config)#vlan 10
SWTO(config-vlan)#exit
SWTO(config)#vlan 20
SWTO(config-vlan)#exit
SWTO(config)#interface range fast 0/1-2
SWTO(config-if-range)#switchport access vlan 10
SWTO(config-if-range)#exit
SWTO(config)#interface range fast 0/10-11
SWTO(config-if-range)#switchport access vlan 20
SWTO(config-if-range)#exit
SWTO(config)#

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname RTO
RTO(config)#interface giga 0/1.10
RTO(config-subif)#encapsulation dot1q 10
RTO(config-subif)#ip address 192.168.0.1 255.255.255.240
RTO(config-subif)#description LAN TO
RTO(config-subif)#description LAN VLAN 10
RTO(config-subif)#exit
RTO(config)#interface giga 0/1.20
RTO(config-subif)#encapsulation dot1q 20
RTO(config-subif)#ip address 192.168.0.17 255.255.255.248
RTO(config-subif)#description LAN VLAN 20
RTO(config-subif)#exit
RTO(config)#interface giga 0/1
RTO(config-if)#no shutdown

RTO(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

%LINK-5-CHANGED: Interface GigabitEthernet0/1.10, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface


GigabitEthernet0/1.10, changed state to up

%LINK-5-CHANGED: Interface GigabitEthernet0/1.20, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface


GigabitEthernet0/1.20, changed state to up

RTO(config-if)#exit
RTO(config)#
RTO#
%SYS-5-CONFIG_I: Configured from console by console

SWTO#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
SWTO(config)#interface giga 0/1
SWTO(config-if)#switchport mode trunk

SWTO(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1,
changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1,


changed state to up

SWTO(config-if)#
RTO#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
RTO(config)#
RTO(config)#ip dhcp excluded-address 192.168.0.1
RTO(config)#ip dhcp pool dhcp-to
RTO(dhcp-config)#network 192.168.0.0 255.255.255.240
RTO(dhcp-config)#default-router 192.168.0.1
RTO(dhcp-config)#exit
RTO(config)#ip dhcp excluded-address 192.168.0.17
RTO(config)#ip dhcp pool dhcp-vlan20
RTO(dhcp-config)#network 192.168.0.16 255.255.255.248
RTO(dhcp-config)#default-router 192.168.0.17
RTO(dhcp-config)#exit
RTO(config)#

RTO#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
RTO(config)#interface serial 0/0/0
RTO(config-if)#clock rate 64000
RTO(config-if)#bandwidth 5000
RTO(config-if)#ip address 200.201.0.1 255.255.255.252
RTO(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down


RTO(config-if)#

RAC#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
RAC(config)#interface serial 0/0/1
RAC(config-if)#ip address 200.201.0.2 255.255.255.252
RAC(config-if)#no shutdown

RAC(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/1, changed


state to up

RAC(config-if)#exit
RAC(config)#interface serial 0/0/0
RAC(config-if)#clock rate 64000
RAC(config-if)#bandwidth 7000
RAC(config-if)#ip address 200.201.0.5 255.255.255.252
RAC(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down


RAC(config-if)#exit
RAC(config)#do show ip route connected
C 172.20.0.0/26 is directly connected, GigabitEthernet0/1.50
C 172.20.0.64/28 is directly connected, GigabitEthernet0/1.60
C 200.201.0.0/30 is directly connected, Serial0/0/1

RAC(config)#router ospf ?
<1-65535> Process ID
RAC(config)#router ospf 10
RAC(config-router)#?
area OSPF area parameters
auto-cost Calculate OSPF interface cost according to bandwidth
default-information Control distribution of default information
distance Define an administrative distance
exit Exit from routing protocol configuration mode
log-adjacency-changes Log changes in adjacency state
neighbor Specify a neighbor router
network Enable routing on an IP network
no Negate a command or set its defaults
passive-interface Suppress routing updates on an interface
redistribute Redistribute information from another routing protocol
router-id router-id for this OSPF process
RAC(config-router)#router-id 1.1.1.1
RAC(config-router)#network 192.168.0.0 0.0.0.15 area ?
<0-4294967295> OSPF area ID as a decimal value
A.B.C.D OSPF area ID in IP address format
RAC(config-router)#network 192.168.0.0 0.0.0.15 area 0
RAC(config-router)#network 192.168.0.16 0.0.0.7
% Incomplete command.
RAC(config-router)#network 192.168.0.16 0.0.0.7 area 0
RAC(config-router)#network 200.201.0.0 0.0.0.3 area 0
RAC(config-router)#

============================================
=========================

SP
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname SWSP
SWSP(config)#banner motd "Equipamento Monitorado"
SWSP(config)#enable secret redes
SWSP(config)#vlan 30
SWSP(config-vlan)#exit
SWSP(config)#vlan 40
SWSP(config-vlan)#exit
SWSP(config)#interface range fast 0/1-2
SWSP(config-if-range)#switchport access vlan 30
SWSP(config-if-range)#exit
SWSP(config)#interface range fast 0/10-11
SWSP(config-if-range)#switchport access vlan 40
SWSP(config-if-range)#exit
SWSP(config)#

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname RSP
RSP(config)#interface giga 0/1.30
RSP(config-subif)#encapsulation dot1q 30
RSP(config-subif)#ip address 172.16.0.1 255.255.255.128
RSP(config-subif)#description LAN VLAN 30
RSP(config-subif)#exit
RSP(config)#interface giga 0/1.40
RSP(config-subif)#encapsulation dot1q 40
RSP(config-subif)#ip address 172.16.0.129 255.255.255.224
RSP(config-subif)#exit
RSP(config)#interface giga 0/1
RSP(config-if)#no shutdown

RSP(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

%LINK-5-CHANGED: Interface GigabitEthernet0/1.30, changed state to up


%LINEPROTO-5-UPDOWN: Line protocol on Interface
GigabitEthernet0/1.30, changed state to up

%LINK-5-CHANGED: Interface GigabitEthernet0/1.40, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface


GigabitEthernet0/1.40, changed state to up

RSP(config-if)#

SWSP#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
SWSP(config)#interface giga 0/1
SWSP(config-if)#switchport mode trunk

SWSP(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1,
changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1,


changed state to up

SWSP(config-if)#

RSP#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
RSP(config)#ip dhcp excluded-address 172.16.0.1
RSP(config)#ip dhcp pool dhcp-vlan30
RSP(dhcp-config)#network 172.16.0.0 255.255.255.128
RSP(dhcp-config)#default-router 172.16.0.1
RSP(dhcp-config)#exit
RSP(config)#ip dhcp excluded-address 172.16.0.129
RSP(config)#ip dhcp pool dhcp-vlan40
RSP(dhcp-config)#network 172.16.0.128 255.255.255.224
RSP(dhcp-config)#default-router 172.16.0.129
RSP(dhcp-config)#exit
RSP(config)#

============================================
==========================AC

Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname SWAC
SWAC(config)#enable secret redes
SWAC(config)#vlan 50
SWAC(config-vlan)#exit
SWAC(config)#vlan 60
SWAC(config-vlan)#exit
SWAC(config)#interface range fast 0/1-2
SWAC(config-if-range)#switchport access vlan 50
SWAC(config-if-range)#exit
SWAC(config)#interface range fast 0/10-11
SWAC(config-if-range)#switchport access vlan 60
SWAC(config-if-range)#exit
SWAC(config)#

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname RAC
RAC(config)#interface giga 0/1.50
RAC(config-subif)#encapsulation dot1q 50
RAC(config-subif)#ip address 172.20.0.1 255.255.255.192
RAC(config-subif)#description LAN VLAN 50
RAC(config-subif)#exit
RAC(config)#interface giga 0/1.60
RAC(config-subif)#encapsulation dot1q 60
RAC(config-subif)#ip address 172.20.0.65 255.255.255.240
RAC(config-subif)#description LAN VLAN 60
RAC(config-subif)#exit
RAC(config)#interface giga 0/1
RAC(config-if)#no shutdown

RAC(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

%LINK-5-CHANGED: Interface GigabitEthernet0/1.50, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface


GigabitEthernet0/1.50, changed state to up
%LINK-5-CHANGED: Interface GigabitEthernet0/1.60, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface


GigabitEthernet0/1.60, changed state to up

RAC(config-if)#

SWAC#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
SWAC(config)#interface giga 0/1
SWAC(config-if)#switchport mode trunk

SWAC(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1,
changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1,


changed state to up

SWAC(config-if)#

RAC(config)#ip dhcp excluded-address 172.20.0.1


RAC(config)#ip dhcp pool dhcp-vlan50
RAC(dhcp-config)#network 172.20.0.0 255.255.255.192
RAC(dhcp-config)#default-router 172.20.0.1
RAC(dhcp-config)#exit
RAC(config)#ip dhcp excluded-address 172.20.0.65
RAC(config)#ip dhcp pool dhcp-vlan60
RAC(dhcp-config)#network 172.20.0.64 255.255.255.240
RAC(dhcp-config)#default-router 172.20.0.65
RAC(dhcp-config)#exit
RAC(config)#

============================================
==========================RJ

Switch>enable
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname SWRJ
SWRJ(config)#enable secre redes
SWRJ(config)#vlan 70
SWRJ(config-vlan)#exit
SWRJ(config)#vlan 80
SWRJ(config-vlan)#exit
SWRJ(config)#interface range fast 0/1-2
SWRJ(config-if-range)#switchport access vlan 70
SWRJ(config-if-range)#exit
SWRJ(config)#interface range fast 0/10-11
SWRJ(config-if-range)#switchport access vlan 80
SWRJ(config-if-range)#exit
SWRJ(config)#

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname RRJ
RRJ(config)#interface giga 0/1.70
RRJ(config-subif)#encapsulation dot1q 70
RRJ(config-subif)#ip address 10.0.0.1 255.255.255.128
RRJ(config-subif)#description LAN VLAN 70
RRJ(config-subif)#exit
RRJ(config)#interface giga 0/1.80
RRJ(config-subif)#ip address 10.0.0.129 255.255.255.0

% Configuring IP routing on a LAN subinterface is only allowed if that


subinterface is already configured as part of an IEEE 802.10, IEEE 802.1Q,
or ISL vLAN.

RRJ(config-subif)#encapsulation dot1q 80
RRJ(config-subif)#ip address 10.0.0.129 255.255.255.128
RRJ(config-subif)#description LAN VLAN 80
RRJ(config-subif)#exit
RRJ(config)#interface giga 0/1
RRJ(config-if)#no shutdown

RRJ(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

%LINK-5-CHANGED: Interface GigabitEthernet0/1.70, changed state to up


%LINEPROTO-5-UPDOWN: Line protocol on Interface
GigabitEthernet0/1.70, changed state to up

%LINK-5-CHANGED: Interface GigabitEthernet0/1.80, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface


GigabitEthernet0/1.80, changed state to up

RRJ(config-if)#

SWAC#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
SWAC(config)#interface giga 0/1
SWAC(config-if)#switchport mode trunk

SWAC(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1,
changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1,


changed state to up

SWAC(config-if)#

RRJ#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
RRJ(config)#ip dhcp excluded-address 10.0.0.1
RRJ(config)#ip dhcp pool dhcp-vlan70
RRJ(dhcp-config)#network 10.0.0.0 255.255.255.128
RRJ(dhcp-config)#default-router 10.0.0.1
RRJ(dhcp-config)#exit
RRJ(config)#ip dhcp excluded-address 10.0.0.129
RRJ(config)#ip dhcp pool dhcp-vlan80
RRJ(dhcp-config)#network 10.0.0.128 255.255.255.128
RRJ(dhcp-config)#default-router 10.0.0.129
RRJ(dhcp-config)#

============================================
==========================

You might also like