0% found this document useful (0 votes)
67 views8 pages

Cấu Hình Layer 3 Cisco

The document describes the configuration of a Cisco layer 3 switch 3750 including VLAN, interface, routing configuration. The switch is connected to a Cisco 1841 router to route between VLANs and the router also has NAT configuration to route traffic to the internet.

Uploaded by

linh nguyen
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)
67 views8 pages

Cấu Hình Layer 3 Cisco

The document describes the configuration of a Cisco layer 3 switch 3750 including VLAN, interface, routing configuration. The switch is connected to a Cisco 1841 router to route between VLANs and the router also has NAT configuration to route traffic to the internet.

Uploaded by

linh nguyen
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/ 8

Cấu Hình Cisco Layer 3

Switch 3750:
Building configuration…
Current configuration : 1956 bytes
!
version 12.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Switch3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
switch 1 provision ws-c3750g-24ts
system mtu routing 1998
ip subnet-zero
Cấu hình Routing
ip routing
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
!
!
interface GigabitEthernet1/0/1
switchport access vlan 2
!
interface GigabitEthernet1/0/2
switchport access vlan 3
!
interface GigabitEthernet1/0/3
switchport access vlan 4
!
interface GigabitEthernet1/0/4
description "Noi voi Router 1841"
no switchport
ip address 192.168.0.254 255.255.255.0
!
interface GigabitEthernet1/0/5
!
interface GigabitEthernet1/0/6
!
interface GigabitEthernet1/0/7
!
interface GigabitEthernet1/0/8
!
interface GigabitEthernet1/0/9
!
interface GigabitEthernet1/0/10
!
interface GigabitEthernet1/0/11
!
interface GigabitEthernet1/0/12
!
interface GigabitEthernet1/0/13
!
interface GigabitEthernet1/0/14
!
interface GigabitEthernet1/0/15
!
interface GigabitEthernet1/0/16
!
interface GigabitEthernet1/0/17
!
interface GigabitEthernet1/0/18
!
interface GigabitEthernet1/0/19
!
interface GigabitEthernet1/0/20
!
interface GigabitEthernet1/0/21
!
interface GigabitEthernet1/0/22
!
interface GigabitEthernet1/0/23
!
interface GigabitEthernet1/0/24
!
interface GigabitEthernet1/0/25
!
interface GigabitEthernet1/0/26
!
interface GigabitEthernet1/0/27
!
interface GigabitEthernet1/0/28
!
interface Vlan1
no ip address
!
Cấu hình interface VLAN
interface Vlan2
ip address 192.168.2.1 255.255.255.0
!
interface Vlan3
ip address 192.168.3.1 255.255.255.0
!
interface Vlan4
ip address 192.168.4.1 255.255.255.0
!
ip classless
Cấu hình default root
ip route 0.0.0.0 0.0.0.0 192.168.0.1
ip http server
ip http secure-server
!
!
!
control-plane
!
!
line con 0
logging synchronous
line vty 0
password telnet
login
line vty 1 4
login
line vty 5 15
login
!
end
Cấu hình VLAN trên 3750:
Switch3(config)#vlan 2
Switch3(config-vlan)#name KeToan
Switch3(config-vlan)#exit
Switch3(config)#vlan 3
Switch3(config-vlan)#name NhanSu
Switch3(config-vlan)#exit
Switch3(config)#vlan 4
Switch3(config-vlan)#name KinhDoanh
Switch3(config-vlan)#exit
Switch3(config)#
Gán vlan cho từng interface:
Switch3(config)#int f0/1

Switch3(config-if)#switchport access vlan 2

Switch3(config)#interface f0/2

Switch3(config-if)#switchport access vlan 3

Switch3(config)#int f0/3

Switch3(config-if)#switchport access vlan 4

Switch3(config-if)#exit

Switch3(config)#
Cấu hình cho Router C1841:

Building configuration…

Current configuration : 959 bytes

version 12.4

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption
!

hostname Router

boot-start-marker

boot-end-marker

no aaa new-model

resource policy

mmi polling-interval 60

no mmi auto-configure

no mmi pvc

mmi snmp-timeout 180

ip subnet-zero

ip cef

!
no ip dhcp use vrf connected

interface FastEthernet0/0

ip address 192.168.1.253 255.255.255.0

ip nat outside

duplex auto

speed auto

interface FastEthernet0/1

ip address 192.168.0.1 255.255.255.0

ip nat inside

duplex auto

speed auto

!
ip classless

ip route 0.0.0.0 0.0.0.0 192.168.1.1

Cấu hình đường ngược lại cho các vlan


ip route 192.168.2.0 255.255.255.0 FastEthernet0/1

ip route 192.168.3.0 255.255.255.0 FastEthernet0/1

ip route 192.168.4.0 255.255.255.0 FastEthernet0/1

no ip http server

ip nat inside source list 1 interface FastEthernet0/0 overload

access-list 1 permit any

control-plane

line con 0

line aux 0

line vty 0 4

login

!
end
Kiểm tra cấu hình vlan:

Show cấu hình ip routing, ở đây do chưa nối với Switch 0, 2 nên chưa có 2 mạng kia:

You might also like