
1. 7.1은 자신의 ip, mac / 상대 ip, mac(FFFF.FFFF.FFFF)을 전송 (ARP request)
2. L2 swtich0에 메시지 도착. switch는 flooding(7.2, L2 switch1) + switch0는 7.1의 mac address를 학습
3. switch1은 flooding(7.3, 7.4) + switch1은 switch0의 mac address 학습
4. 7.3은 자신의 ip, mac / 상대 ip, mac을 전송 (ARP reply)
5. swtich1은 switch 0으로 전송 + switch1은 7.3의 mac address를 학습
6. switch0은 7.3의 mac address 학습
7. 7.1이 7.3의 mac address를 받는다
+) ARP 과저에 사용되는 메시지의 형태
1. Ethernet 헤더 – source mac, destination mac
2. ARP message – source ip & mac, destination ip & mac, OPER 등등이 있다.
1은 해당 메시지가 destination에 물리적으로 전달되는데 사용되고, 2는 destination 전달 및 source로 전달하기 위해 사용된다.
따라서 스위치가 사용하는 부분은 ethernet 헤더, end device와 router가 사용하는 부분은 헤더와 ARP message이다.
+) 추가적으로 스위치와 같은 통신장비는 주기적으로 프레임을 보내거나 브로드캐스 메시지를 통해 서로 간의 mac 주소를 학습한다.
즉, 위의 시나리오를 통해서 스위치 간의 mac주소는 학습할 수 없다.

1. 7.2가 ‘자신의 ip, mac’ & ‘default gateway의 ip, mac(FFFF.FFFF.FFFF)’ 전송 (ARP request)
2. L2 switch0는 flooding + 7.2의 mac address 학습
3. router는 ‘자신의 ip, mac’ & ‘7.2의 ip, mac’ 전송 (ARP reply) + arp table, routing table에 7.2의 내용이 학습된다.
4. L2 switch0는 router의 mac address 학습
4. 7.2는 router에게 icmp 전송
5. router는 ‘자신의 ip, mac’ & ‘8.2의 ip, mac(FFFF.FFFF.FFFF)’ 전송 (ARP request)
6. L2 switch1은 flooding + router의 mac address 학습
7. 8.2는 ‘자신의 ip, mac’ & ‘router의 ip, mac’ 전송 (ARP reply)
8. L2 switch1는 8.2의 mac address 학습
9. router의 arp table, routing table에 8.2의 내용이 학습된다.
+) 7.3이 router로 arp를 보내는 이유.
Arp는 lan안에서 작동하며, dest 8.2 는 다른 lan에 포함된 end device이기 때문에 default gateway로 설정한 router로 arp를 전송한다.
다시말해, 외부 네트워크와 통신하기 위해선 gateway를 통해야한다.
좋아요.