Sunteți pe pagina 1din 4

w_3560#show running-config

Building configuration...


Current configuration : 2455 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Sw_3560
!
ip routing
!
interface FastEthernet0/1
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/2
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/3
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/4
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/5
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/6
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/7
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/8
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/9
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/10
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/11
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/12
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/13
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/14
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/15
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/16
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/17
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/18
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/19
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/20
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/21
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/22
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/23
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/24
switchport access vlan 30
switchport mode access
!
interface Vlan1
no ip address
shutdown
!
interface Vlan10
ip address 192.168.10.2 255.255.255.0
!
interface Vlan20
ip address 192.168.20.2 255.255.255.0


interface Vlan30
ip address 192.168.30.2 255.255.255.0


ip classless


line con 0
line vty 0 4
login
end

VLAN30 ca em vn ko ra c Internet , d ping 20.2 va 10.2 OK


Mnh tst qua lab m hnh ca ban dng PBR. Ban dng 2 gw khc net vi Lan lun cho khi nhp nhng
(ban mun gi nh c cng c), y mnh v du 192.168.1.0 v 192.168.2.0.
Bc 1: Cu hnh default root trn sw layer 3
ip route 0.0.0.0 0.0.0.0 192.168.1.1 (MD1)
ip route 0.0.0.0 0.0.0.0 192.168.2.1 10 (MD2)
Bc 2: Cu hnh route trn 2 modem thy mang Lan
(MD1) ip route 192.168.0.0 255.255.0.0 192.168.1.2
(MD2) ip route 192.168.0.0 255.255.0.0 192.168.2.2
Tip theo l lm trn sw layer 3
Bc 3: tao access-list
ip access-list standard 1
permit 192.168.10.0 0.0.0.255
permit 192.168.20.0 0.0.0.255
ip access-list standard 2
permit 192.168.30.0 0.0.0.255
Bc 4: Tao route map
route-map map1 permit 1
match ip address 1
set ip next-hop 192.168.1.1

route-map map2 permit 2
match ip address 2
set ip next-hop 192.168.2.1
Bc 5: Set interface cho route map
int vlan 10
ip policy route-map map1
int vlan 20
ip policy route-map map1
int vlan 30
ip policy route-map map2

By gi th cc pc trong vlan 10,20 i ra net theo md1, vlan 30 i ra net theo md2. Trn sw layer 3, ban
show route-map verify hoc bt debug ip policy theo di.
kiennhpt
26-09-2012, 03:42 PM
Mnh tst qua lab m hnh ca ban dng PBR. Ban dng 2 gw khc net vi Lan lun cho khi nhp nhng
(ban mun gi nh c cng c), y mnh v du 192.168.1.0 v 192.168.2.0.
Bc 1: Cu hnh default root trn sw layer 3
ip route 0.0.0.0 0.0.0.0 192.168.1.1 (MD1)
ip route 0.0.0.0 0.0.0.0 192.168.2.1 10 (MD2)
Bc 2: Cu hnh route trn 2 modem thy mang Lan
(MD1) ip route 192.168.0.0 255.255.0.0 192.168.1.2
(MD2) ip route 192.168.0.0 255.255.0.0 192.168.2.2
Tip theo l lm trn sw layer 3
Bc 3: tao access-list
ip access-list standard 1
permit 192.168.10.0 0.0.0.255
permit 192.168.20.0 0.0.0.255
ip access-list standard 2
permit 192.168.30.0 0.0.0.255
Bc 4: Tao route map
route-map map1 permit 1
match ip address 1
set ip next-hop 192.168.1.1

route-map map2 permit 2
match ip address 2
set ip next-hop 192.168.2.1
Bc 5: Set interface cho route map
int vlan 10
ip policy route-map map1
int vlan 20
ip policy route-map map1
int vlan 30
ip policy route-map map2

By gi th cc pc trong vlan 10,20 i ra net theo md1, vlan 30 i ra net theo md2. Trn sw layer 3, ban
show route-map verify hoc bt debug ip policy theo di.

.Hng dn ca anh rt chi tit. Em lm ok ri. cm n anh vdk nh

S-ar putea să vă placă și