lost and found ( for me ? )

Dynamips : PPPoE : 固定IP NAT なしの設定例

PC A : 10.0.0.200 ( Gateway 10.0.0.254 )
R0 ( PPPoE Client ) : 0/1 10.0.0.254 , 0/0 unnumbered
R1 ( PPPoE Server ) : 0/0 10.0.0.1 , 0/1 20.0.0.254
PC B : 20.0.0.200 ( Gateway 20.0.0.254 )

フレッツ固定IP の設定を想定。NATしない構成。
R0 ( PPPoE Client ) の WAN 側に IP はふらない。
R0 の LAN側 e0/1 に割り当てられたグローバルIPのどれかをアサイン。
PC A にも割り当てられたグローバルIPのどれかをアサイン。

フレッツ固定IP を契約したときにもらう情報、IPアドレス、ユーザ名、パスワードの情報でR0 (PPPoE Client )の設定ができるか確認するのが目的。
PPPoE が確率できて、PC A (10.0.0.200) の IP で PC B (20.0.0.200) と通信できることを確認した。


[ config ]

- R0 ( PPPoE Client )

R0#show running-config
Building configuration...

Current configuration : 1058 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R0
!
boot-start-marker
boot-end-marker
!
enable password hello
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Ethernet0/0
no ip address
half-duplex
pppoe enable group global
pppoe-client dial-pool-number 1
!
interface Ethernet0/1
ip address 10.0.0.254 255.255.255.0
ip tcp adjust-mss 1414
half-duplex
!
interface Ethernet0/2
no ip address
shutdown
half-duplex
!
interface Ethernet0/3
no ip address
shutdown
half-duplex
!
interface Dialer1
ip unnumbered Ethernet0/1
ip mtu 1454
encapsulation ppp
dialer pool 1
dialer-group 1
ppp authentication chap callin
ppp chap hostname cisco
ppp chap password 0 cisco
!
ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 Dialer1
!
!
!
dialer-list 1 protocol ip permit
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0
password hello
login
line vty 1 4
login
!
!
end

R0#

- R1 ( PPPoE Server )

R1#show running-config
Building configuration...

Current configuration : 1052 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
enable password hello
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
vpdn enable
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
username cisco password 0 cisco
!
!
!
!
!
!
bba-group pppoe global
virtual-template 1
!
bba-group pppoe test
virtual-template 1
!
!
interface Ethernet0/0
no ip address
half-duplex
pppoe enable group test
!
interface Ethernet0/1
ip address 20.0.0.254 255.255.255.0
half-duplex
!
interface Ethernet0/2
no ip address
shutdown
half-duplex
!
interface Ethernet0/3
no ip address
shutdown
half-duplex
!
interface Virtual-Template1
mtu 1454
ip address 10.0.0.1 255.255.255.0
peer default ip address pool test1
ppp authentication chap
!
ip local pool test1 10.0.0.200 10.0.0.254
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0
password hello
login
line vty 1 4
login
!
!
end

R1#

[ logs ]

R0 ( PPPoE Client )

R0#show ip route
Codes: 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
   i - IS-IS, su - IS-IS summary, 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 0.0.0.0 to network 0.0.0.0

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C    10.0.0.0/24 is directly connected, Ethernet0/1
C    10.0.0.1/32 is directly connected, Dialer1
S*   0.0.0.0/0 is directly connected, Dialer1

R1 ( PPPoE Server )

R1#show ip route
Codes: 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
   i - IS-IS, su - IS-IS summary, 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

20.0.0.0/24 is subnetted, 1 subnets
C    20.0.0.0 is directly connected, Ethernet0/1
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C    10.0.0.0/24 is directly connected, Virtual-Access2.1
C    10.0.0.254/32 is directly connected, Virtual-Access2.1

[ PC A から PC B に HTTP アクセス ]

PC A のリアルIP でアクセスできた。

PC A# wget 20.0.0.200
--2010-09-17 14:49:49--  http://20.0.0.200/
20.0.0.200:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 13 [text/html]
`index.html.1' に保存中

100%[================================================>] 13       --.-K/s 時間 0s

2010-09-17 14:49:49 (2.01 MB/s) - `index.html.1' へ保存完了 [13/13]

- PC B でキャプチャしたデータ ( PC A のリアルIP でアクセスがきている )

PC A : 10.0.0.200
PC B : 20.0.0.200

PC B # tshark -i eth0 port 80
Running as user "root" and group "root". This could be dangerous.
Capturing on eth0
 0.000000   10.0.0.200 -> 20.0.0.200   TCP 48466 > http [SYN] Seq=0 Win=5840 Len=0 MSS=1414 TSV=2167766 TSER=0 WS=4
 0.000006   20.0.0.200 -> 10.0.0.200   TCP http > 48466 [SYN, ACK] Seq=0 Ack=1 Win=5792 Len=0 MSS=1460 TSV=3499115 TSER=2167766 WS=4
 0.010895   10.0.0.200 -> 20.0.0.200   TCP 48466 > http [ACK] Seq=1 Ack=1 Win=5840 Len=0 TSV=2167808 TSER=3499115
 0.010904   10.0.0.200 -> 20.0.0.200   HTTP GET / HTTP/1.0
 0.010919   20.0.0.200 -> 10.0.0.200   TCP http > 48466 [ACK] Seq=1 Ack=116 Win=5792 Len=0 TSV=3499125 TSER=2167808
 0.011749   20.0.0.200 -> 10.0.0.200   HTTP HTTP/1.1 200 OK  (text/html)
 0.011968   20.0.0.200 -> 10.0.0.200   TCP http > 48466 [FIN, ACK] Seq=275 Ack=116 Win=5792 Len=0 TSV=3499126 TSER=2167808
 0.022500   10.0.0.200 -> 20.0.0.200   TCP 48466 > http [ACK] Seq=116 Ack=275 Win=6912 Len=0 TSV=2167818 TSER=3499126
 0.022516   10.0.0.200 -> 20.0.0.200   TCP 48466 > http [FIN, ACK] Seq=116 Ack=276 Win=6912 Len=0 TSV=2167818 TSER=3499126
 0.022523   20.0.0.200 -> 10.0.0.200   TCP http > 48466 [ACK] Seq=276 Ack=117 Win=5792 Len=0 TSV=3499137 TSER=2167818

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.