bxm's IT Story

PPP - CHAP 방식 GNS3 Programming 본문

Network/Cisco (KEDU)

PPP - CHAP 방식 GNS3 Programming

bxmsta9ram 2021. 6. 9. 17:04

[공통 - R1,R2,SW1,SW2,PC1,PC2,PC3,PC4]

ena

conf t

no ip domain lookup

line c 0

  logg sy

  exec-timeout 0

  exit

line vty 0 4

  pass cisco

  exit

hostname ##


[SW1]

conf t

no ip routing

vlan 10

  exit

vlan 20

  exit

int f1/1

  switchport mode access

  switchport access vlan 10

  exit

int f1/2

  switchport mode access

  switchport access vlan 20

  exit

int f1/15

  switchport trunk encapsulation dot1q

  switchport mode trunk

  switchport trunk native vlan 10


[SW2]

 

conf t

no ip routing

vlan 30

  exit

vlan 40

  exit

int f1/3

  switchport mode access

  switchport access vlan 30

  exit

int f1/4

  switchport mode access

  switchport access vlan 40

  exit

int f1/15

  switchport trunk encapsulation dot1q

  switchport mode trunk

  switchport trunk native vlan 30

  do wr

 


[R1]

conf t

int f0/0

  no shutdown

  exit

int f0/0.10

  encapsulation dot1q 10 Native

  ip address 192.168.10.254 255.255.255.0

  exit

int f0/0.20

  encapsulation dot1q 20

  ip address 192.168.20.254 255.255.255.0

  exit

!

username R2 password cisco

!

int s1/0

  no shutdown

  encapsulation ppp

  ppp authentication chap

  ip address 1.1.12.1 255.255.255.252   (#30비트 이므로!!,  1.1.12.0/30)

  exit

!

ip route 192.168.30.0 255.255.255.0 s1/0 1.1.12.2

ip route 192.168.40.0 255.255.255.0 s1/0 1.1.12.2

!

do wr


[R2]

conf t

int f0/0

  no shutdown

  exit

int f0/0.30

  encapsulation dot1q 30 Native

  ip address 192.168.30.254 255.255.255.252   (#30비트 이므로!!,  1.1.12.0/30)

  exit

int f0/0.40

  encapsulation dot1q 40

  ip address 192.168.40.254 255.255.255.0

  exit

!

username R1 password cisco

!

int s1/0

  no shutdown

  encapsulation ppp

  ppp authentication chap

  ip address 1.1.12.2 255.255.255.0

  exit

!

ip route 192.168.10.0 255.255.255.0 s1/0 1.1.12.1

ip route 192.168.20.0 255.255.255.0 s1/0 1.1.12.1

!

do wr


[PC1]

 

conf t

no ip routing

ip default-gateway 192.168.10.254

int f0/0

  no shutdown

  ip address 192.168.10.1 255.255.255.0

  do wr

 


[PC2]

 

conf t

no ip routing

ip default-gateway 192.168.20.254

int f0/0

  no shutdown

  ip address 192.168.20.2 255.255.255.0

  do wr

 


[PC3]

conf t

no ip routing

ip default-gateway 192.168.30.254

int f0/0

  no shutdown

  ip address 192.168.30.3 255.255.255.0

  do wr


[PC4]

conf t

no ip routing

ip default-gateway 192.168.40.254

int f0/0

  no shutdown

  ip address 192.168.40.4 255.255.255.0

  do wr

 

 

간단히 PC1 -> PC4로 통신을 해봤는데 잘 된다!

 

 

 

 

 

 

 

 

 

 

 

 

 

게이트웨이로 핑을 날린다 -> 안된다? IP를 확인
show ip interface breif

ip가 잘못되어있으면?

int f0/0
ip add 192.168.10.1 255.255.255.0
end

--------------------------------------------------

R1의 IP
show ip interface
0/0.10과 0/0.20의 ip를 확인을 해야함.

int f0/0.20 / f0/0.30~ 이런식으로 각각 pc에 들어가서 확인
ip add ~~

'Network > Cisco (KEDU)' 카테고리의 다른 글

Floating Static Route  (0) 2021.06.10
프레임 릴레이  (0) 2021.06.10
PPP - Pap vs CHAP  (0) 2021.06.09
PPP - CHAP 방식  (0) 2021.06.09
PPP (Wan에서의 pap(팹_암호화 하지 않은) 방식)  (0) 2021.06.09