0% found this document useful (0 votes)
76 views12 pages

Main Router Config in Which Vlans Created

This document contains configurations for a router and switch. On the router, VLANs 10, 20 are created on subinterfaces of Gi0/0/1 and routing is enabled between the VLANs and other networks using RIP. DHCP pools are configured to serve addresses for each VLAN subnet. On the switch, port Fa3/1 is configured as a trunk port to carry multiple VLANs.
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)
76 views12 pages

Main Router Config in Which Vlans Created

This document contains configurations for a router and switch. On the router, VLANs 10, 20 are created on subinterfaces of Gi0/0/1 and routing is enabled between the VLANs and other networks using RIP. DHCP pools are configured to serve addresses for each VLAN subnet. On the switch, port Fa3/1 is configured as a trunk port to carry multiple VLANs.
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/ 12

Main Router config in which vlans created

Press RETURN to get started!

Router>en
Router#conf
Router#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hos
Router(config)#hostname KHI
KHI(config)#sh
KHI(config)#shsrirdidpdod
KHI(config)#interface GigabitEthernet0/0/0
KHI(config-if)#ip address 12.1.1.1 255.0.0.0
KHI(config-if)#ip address 12.1.1.1 255.255.255.0
KHI(config-if)#no shutdown
KHI(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0/0, changed state to up

KHI(config-if)#g0/0/1.10
^
% Invalid input detected at '^' marker.
KHI(config-if)#g0gint
KHI(config-if)#ini
KHI(config-if)#exit
KHI(config)#interface GigabitEthernet0/0/1
KHI(config-if)#no shutdown
KHI(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0/1, changed state to up

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


up

KHI(config-if)#int
KHI(config-if)#exit
KHI(config)#
KHI(config)#^Z
KHI#
%SYS-5-CONFIG_I: Configured from console by console

KHI#conf
KHI#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
KHI(config)#int
KHI(config)#interface g0/0/1.10
KHI(config-subif)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0/1.10, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0/1.10, changed state


to up

KHI(config-subif)#en
KHI(config-subif)#encapsulation do
KHI(config-subif)#encapsulation dot1Q 10
KHI(config-subif)#ip ad
KHI(config-subif)#ip address 10.1.1.1 255.255.255.0
KHI(config-subif)#no sh
KHI(config-subif)#
KHI(config-subif)#^Z
KHI#
%SYS-5-CONFIG_I: Configured from console by console

KHI#conf
KHI#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
KHI(config)#interface g0/0/1.20
KHI(config-subif)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0/1.20, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0/1.20, changed state
to up

KHI(config-subif)#encapsulation dot1Q 20
KHI(config-subif)#ip address 20.1.1.1 255.255.255.0
KHI(config-subif)#run sh ip int br
KHI(config-subif)#run sh ip int br
^
% Invalid input detected at '^' marker.
KHI(config-subif)#^Z
KHI#
%SYS-5-CONFIG_I: Configured from console by console

KHI#sh
KHI#sh ip int br
KHI#sh ip int brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0/0 12.1.1.1 YES manual up down
GigabitEthernet0/0/1 unassigned YES unset up up
GigabitEthernet0/0/1.1010.1.1.1 YES manual up up
GigabitEthernet0/0/1.2020.1.1.1 YES manual up up
GigabitEthernet0/0/2 unassigned YES unset administratively down down
Vlan1 unassigned YES unset administratively down down
KHI#sh ip rou
KHI#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks


C 10.1.1.0/24 is directly connected, GigabitEthernet0/0/1.10
L 10.1.1.1/32 is directly connected, GigabitEthernet0/0/1.10
20.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 20.1.1.0/24 is directly connected, GigabitEthernet0/0/1.20
L 20.1.1.1/32 is directly connected, GigabitEthernet0/0/1.20

KHI#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
KHI(config)#rou
KHI(config)#router r
KHI(config)#router rip
KHI(config-router)#ver
KHI(config-router)#version 2
KHI(config-router)#no
KHI(config-router)#no au
KHI(config-router)#no auto-summary
KHI(config-router)#ne
KHI(config-router)#network 12.1.1.0
KHI(config-router)#network 10.1.1.0
KHI(config-router)#network 20.1.1.0
KHI(config-router)#exit
KHI(config)#

Router config in which dhcp config

Router>en
Router#con
Router#con
% Ambiguous command: "con"
Router#conf
Router#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ho
Router(config)#hostname LHR
LHR(config)#
LHR(config)#interface GigabitEthernet0/0/0
LHR(config-if)#ip address 12.1.1.2 255.0.0.0
LHR(config-if)#ip address 12.1.1.2 255.255.255.0
LHR(config-if)#no shutdown
LHR(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0/0, changed state to up

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


up

LHR(config-if)#exit
LHR(config)#interface GigabitEthernet0/0/1
LHR(config-if)#ip address
% Incomplete command.
LHR(config-if)#ip address 30.0.0.1 255.0.0.0
LHR(config-if)#ip address 30.0.0.1 255.255.255.0
LHR(config-if)#no shutdown
LHR(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0/1, changed state to up

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


up

LHR(config-if)#^Z
LHR#
%SYS-5-CONFIG_I: Configured from console by console

LHR#conf
LHR#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
LHR(config)#rou
LHR(config)#router r
LHR(config)#router rip
LHR(config-router)#v
LHR(config-router)#version 2
LHR(config-router)#no
LHR(config-router)#no au
LHR(config-router)#no auto-summary
LHR(config-router)#ne
LHR(config-router)#network 12.1.1.0
LHR(config-router)#network 30.1.1.0
LHR(config-router)#exit
LHR(config)#^Z
LHR#

LHR>en
LHR#conf
LHR#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
LHR(config)#ip dh
LHR(config)#ip dhcp po
LHR(config)#ip dhcp pool LAN-10
LHR(dhcp-config)#ne
LHR(dhcp-config)#network 10.1.1.0 255.255.255.0
LHR(dhcp-config)#def
LHR(dhcp-config)#default-router 10.1.1.1
LHR(dhcp-config)#dn
LHR(dhcp-config)#dns-server 8.8.8.8
LHR(dhcp-config)#exit
LHR(config)#
LHR(config)#ip
LHR(config)#ip dhcp pool LAN-20
LHR(dhcp-config)#network 20.1.1.0 255.255.255.0
LHR(dhcp-config)#default-router 20.1.1.1
LHR(dhcp-config)#dns-server 8.8.8.8
LHR(dhcp-config)#ip dhcp pool LAN-30
LHR(dhcp-config)#network 30.1.1.0 255.255.255.0
LHR(dhcp-config)#default-router 30.1.1.1
LHR(dhcp-config)#dns-server 8.8.8.8
LHR(dhcp-config)#exit
LHR(config)#exit
LHR#
%SYS-5-CONFIG_I: Configured from console by console

LHR#sh
LHR#show ru
LHR#show running-config
Building configuration...

Current configuration : 1033 bytes


!
version 16.6.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname LHR
!
!
!
!
!
ip dhcp pool LAN-10
network 10.1.1.0 255.255.255.0
default-router 10.1.1.1
dns-server 8.8.8.8
ip dhcp pool LAN-20
network 20.1.1.0 255.255.255.0
default-router 20.1.1.1
dns-server 8.8.8.8
ip dhcp pool LAN-30
network 30.1.1.0 255.255.255.0
default-router 30.1.1.1
dns-server 8.8.8.8
!
!
!
ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0/0
ip address 12.1.1.2 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/0/1
ip address 30.0.0.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/0/2
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
router rip
version 2
network 12.0.0.0
network 30.0.0.0
no auto-summary
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
End

For excluding ip

LHR# conf
LHR# configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
LHR(config)#ip dh
LHR(config)#ip dhcp ec
LHR(config)#ip dhcp ex
LHR(config)#ip dhcp excluded-address 10.1.1.1 10.1.1.10

Switch config

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up


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

%LINK-5-CHANGED: Interface FastEthernet1/1, changed state to up

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

%LINK-5-CHANGED: Interface FastEthernet2/1, changed state to up

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

%LINK-5-CHANGED: Interface Ethernet6/1, changed state to up

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

%LINK-5-CHANGED: Interface FastEthernet3/1, changed state to up

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

Switch>e
% Ambiguous command: "e"
Switch>en
Switch#sh
Switch#show vl
Switch#show vlan br

VLAN Name Status Ports


---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa1/1, Fa2/1, Fa3/1
Fa4/1, Fa5/1, Eth6/1
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
Switch#en
Switch#conf
Switch#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#in
Switch(config)#interface fa3/1
Switch(config-if)#sw
Switch(config-if)#switchport mo
Switch(config-if)#switchport mode tr
Switch(config-if)#switchport mode trunk
Switch(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet3/1, changed state to down

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

Switch(config-if)#
Switch(config-if)#^Z
Switch#
%SYS-5-CONFIG_I: Configured from console by console

Switch#conf
Switch#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vl
Switch(config)#vlan 10
Switch(config-vlan)#nam
Switch(config-vlan)#name HR
Switch(config-vlan)#vl
Switch(config-vlan)#vl
Switch(config-vlan)#^Z
Switch#
%SYS-5-CONFIG_I: Configured from console by console

Switch#conf
Switch#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vla
Switch(config)#vlan 20
Switch(config-vlan)#name Sales
Switch(config-vlan)#
Switch(config-vlan)#^Z
Switch#
%SYS-5-CONFIG_I: Configured from console by console

Switch#conf
Switch#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#sw
Switch(config)#int
Switch(config)#interface f0/1-1
^
% Invalid input detected at '^' marker.
Switch(config)#int ra
Switch(config)#int range f0/1-1
Switch(config-if-range)#sw
Switch(config-if-range)#switchport mo
Switch(config-if-range)#switchport mode ac
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#sw
Switch(config-if-range)#switchport ac
Switch(config-if-range)#switchport access vl
Switch(config-if-range)#switchport access vlan 10
Switch(config-if-range)#^Z
Switch#
%SYS-5-CONFIG_I: Configured from console by console
configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int range f2/1
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 20
Switch(config-if-range)#z
^
% Invalid input detected at '^' marker.
Switch(config-if-range)#^Z
Switch#
%SYS-5-CONFIG_I: Configured from console by console

Switch#conf
Switch#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int range f6/1
interface range not validated - command rejected
Switch(config)#int f2/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#^Z
Switch#
%SYS-5-CONFIG_I: Configured from console by console

Switch#conf
Switch#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int f6/1
%Invalid interface type and number
Switch(config)#int eth6/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#^Z
Switch#
%SYS-5-CONFIG_I: Configured from console by console

Switch#conf
Switch#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int f1/1
Switch(config-if)#sw
Switch(config-if)#switchport mo
Switch(config-if)#switchport mode ac
Switch(config-if)#switchport mode access
Switch(config-if)#sw
Switch(config-if)#switchport ac
Switch(config-if)#switchport access vl
Switch(config-if)#switchport access vlan 10
Switch(config-if)#^Z
Switch#
%SYS-5-CONFIG_I: Configured from console by console

You might also like