PDA

View Full Version : MAC trong Switch



mind2000
16-11-2005, 02:55 PM
Có ai cho tôi biết trong cấu trúc vật lý của một SW có bao nhiêu MAC? theo tôi thi không phải là mỗi interface của SW sữ có một MAC vì thực ra MAC nếu có thì cái này cũng không cần dùng làm gì cả.
Một vấn đề nữa, khi gán IP cho VLAN thì nó sẽ lấy MAC ở đâu ra để gán tương ứng cho cái IP đấy?

nhanh
16-11-2005, 08:49 PM
Mình không hiểu ý bạn là nếu mỗi interface có một MAC thì MAC này cũng không sử dụng làm gì. Gói tin muốn đi đến đâu thì phải có địa chỉ rõ ràng, tức là nếu nó đến interface của SW thì nó cũng phải có địa chỉ MAC của interrface thì mới đến được chứ. Không hiểu có phải bạn nghĩ là 1 switch chỉ cần 1 MAC, còn gói tin muốn đến swithc đấy thì kết hợp MAC đấy với số port à. Việc chuyển gói tin chỉ dựa trên địa chỉ MAC chứ không dựa trên các thông số khác. Bất kỳ một interface nào đều có địa chỉ MAC.

Gán IP cho VLAN là gán subnet chứ có phải từng IP riêng đâu, cho nên ở đây đâu cần quan tâm đến MAC. Chỉ có các máy tham gia trong VLAN đấy thì mới có địa chỉ IP riêng biệt nằm trong dải subnet đã gán cho VLAN đấy. Lúc đấy mới cần đến ARP để map IP và MAC. VLAN thì cũng giống như một LAN bình thường, có gì khác đâu.

thabeo
18-11-2005, 09:07 AM
Mỗi Interface trên Switch đều có một MAC Address, thêm nữa trong Switch còn có thêm một số MAC address nữa (Ví dụ: trong Switch 2950 là 1024 MAC Address) ứng với mỗi một VLAN.

Ducnhvn
18-11-2005, 08:19 PM
Theo em đuợc biết mỗi SW , bất kể hãng nào cũng chỉ có 1 MAC address mà thui .

To Mr. Nhanh : Theo em đuợc biết thì cái Địa chỉ mac trong cái Packet của bất kỳ gói tin nào đến SW là MAC ADDress của đích đến , không hề là MAC ADDRESS của POrt trong SW

one
23-11-2005, 10:57 AM
Theo mình hiểu thì mỗi interface của sw sẽ có 1 địa chỉ MAC còn tất cả các vlan chung 1 địa chỉ MAC:

Switch#sh int fa0/1
FastEthernet0/1 is down, line protocol is down (notconnect)
Hardware is Fast Ethernet, address is 000e.832b.7981 (bia 000e.832b.7981)
MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Auto-duplex, Auto-speed, media type is 10/100BaseTX
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts (0 multicast)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 0 multicast, 0 pause input
0 input packets with dribble condition detected
0 packets output, 0 bytes, 0 underruns

Switch#sh int fa0/2
FastEthernet0/2 is up, line protocol is up (connected)
Hardware is Fast Ethernet, address is 000e.832b.7982 (bia 000e.832b.7982)
MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Half-duplex, 10Mb/s, media type is 10/100BaseTX
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:09, output 00:00:01, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
1454 packets input, 137924 bytes, 0 no buffer
Received 315 broadcasts (0 multicast)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 176 multicast, 0 pause input
0 input packets with dribble condition detected
12858 packets output, 1167690 bytes, 0 underruns

Switch#sh int vlan 1
Vlan1 is up, line protocol is up
Hardware is EtherSVI, address is 000e.832b.7980 (bia 000e.832b.7980)
Internet address is 192.168.1.5/24
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:03, output 02:41:54, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
4903 packets input, 566785 bytes, 0 no buffer
Received 0 broadcasts (0 IP multicast)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
184 packets output, 12912 bytes, 0 underruns
0 output errors, 0 interface resets
0 output buffer failures, 0 output buffers swapped out

Switch#sh int vlan2
Vlan2 is up, line protocol is up
Hardware is EtherSVI, address is 000e.832b.7980 (bia 000e.832b.7980)
Internet address is 100.0.0.1/24
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts (0 IP multicast)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 interface resets
0 output buffer failures, 0 output buffers swapped out

tuannvptit
28-11-2005, 11:19 AM
Bac nao giai thich ho em truong hop nay voi ??

GigabitEthernet3/22 is up, line protocol is up (connected)
Hardware is Gigabit Ethernet Port, address is 0013.6010.123f (bia 0013.6010.123f)
Description: Connect to FW2
Internet address is 10.192.238.1/30
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
reliability 255/255, txload 8/255, rxload 8/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 1000Mb/s, link type is auto, media type is 10/100/1000-TX
input flow-control is off, output flow-control is off
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:01, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 32260000 bits/sec, 32531 packets/sec
5 minute output rate 35261000 bits/sec, 32487 packets/sec
L3 in Switched: ucast: 397067216 pkt, 42489699146 bytes - mcast: 0 pkt, 0 bytes
L3 out Switched: ucast: 3758136 pkt, 1749555407 bytes - mcast: 0 pkt, 0 bytes
396973973 packets input, 49630253455 bytes, 0 no buffer
Received 2 broadcasts (0 IP multicast)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 input packets with dribble condition detected
397330818 packets output, 50486980819 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
GigabitEthernet3/23 is up, line protocol is up (connected)
Hardware is Gigabit Ethernet Port, address is 0013.6010.123f (bia 0013.6010.123f)
Description: Connect to FW4
Internet address is 10.192.238.9/30
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 1000Mb/s, link type is auto, media type is 10/100/1000-TX
input flow-control is on, output flow-control is on
ARP type: ARPA, ARP Timeout 04:00:00
Last input 02:14:27, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 1850000 bits/sec, 430 packets/sec
5 minute output rate 335000 bits/sec, 272 packets/sec
L3 in Switched: ucast: 9490148 pkt, 4943776511 bytes - mcast: 0 pkt, 0 bytes
L3 out Switched: ucast: 6035183 pkt, 721845101 bytes - mcast: 0 pkt, 0 bytes
9488785 packets input, 5121458537 bytes, 0 no buffer
Received 1 broadcasts (0 IP multicast)
2 runts, 0 giants, 0 throttles
2 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 input packets with dribble condition detected
6038325 packets output, 858990248 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
----------------------------------------------------------------
Vlan10 is up, line protocol is up
Hardware is Ethernet SVI, address is 0013.6010.123f (bia 0013.6010.123f)
Description: VLAN Building K
Internet address is 10.192.18.2/23
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:01, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
L3 in Switched: ucast: 0 pkt, 0 bytes - mcast: 0 pkt, 0 bytes
L3 out Switched: ucast: 0 pkt, 0 bytes - mcast: 0 pkt, 0 bytes
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts (0 IP multicast)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
79268 packets output, 3804656 bytes, 0 underruns
0 output errors, 0 interface resets
0 output buffer failures, 0 output buffers swapped out

thitmeongonhon
29-11-2005, 03:38 AM
Bac nao giai thich ho em truong hop nay voi ??

GigabitEthernet3/22 is up, line protocol is up (connected)
Hardware is Gigabit Ethernet Port, address is 0013.6010.123f (bia 0013.6010.123f)
Description: Connect to FW2
Internet address is 10.192.238.1/30
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
reliability 255/255, txload 8/255, rxload 8/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 1000Mb/s, link type is auto, media type is 10/100/1000-TX
input flow-control is off, output flow-control is off
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:01, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 32260000 bits/sec, 32531 packets/sec
5 minute output rate 35261000 bits/sec, 32487 packets/sec
L3 in Switched: ucast: 397067216 pkt, 42489699146 bytes - mcast: 0 pkt, 0 bytes
L3 out Switched: ucast: 3758136 pkt, 1749555407 bytes - mcast: 0 pkt, 0 bytes
396973973 packets input, 49630253455 bytes, 0 no buffer
Received 2 broadcasts (0 IP multicast)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 input packets with dribble condition detected
397330818 packets output, 50486980819 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
GigabitEthernet3/23 is up, line protocol is up (connected)
Hardware is Gigabit Ethernet Port, address is 0013.6010.123f (bia 0013.6010.123f)
Description: Connect to FW4
Internet address is 10.192.238.9/30
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 1000Mb/s, link type is auto, media type is 10/100/1000-TX
input flow-control is on, output flow-control is on
ARP type: ARPA, ARP Timeout 04:00:00
Last input 02:14:27, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 1850000 bits/sec, 430 packets/sec
5 minute output rate 335000 bits/sec, 272 packets/sec
L3 in Switched: ucast: 9490148 pkt, 4943776511 bytes - mcast: 0 pkt, 0 bytes
L3 out Switched: ucast: 6035183 pkt, 721845101 bytes - mcast: 0 pkt, 0 bytes
9488785 packets input, 5121458537 bytes, 0 no buffer
Received 1 broadcasts (0 IP multicast)
2 runts, 0 giants, 0 throttles
2 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 input packets with dribble condition detected
6038325 packets output, 858990248 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
----------------------------------------------------------------
Vlan10 is up, line protocol is up
Hardware is Ethernet SVI, address is 0013.6010.123f (bia 0013.6010.123f)
Description: VLAN Building K
Internet address is 10.192.18.2/23
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:01, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
L3 in Switched: ucast: 0 pkt, 0 bytes - mcast: 0 pkt, 0 bytes
L3 out Switched: ucast: 0 pkt, 0 bytes - mcast: 0 pkt, 0 bytes
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts (0 IP multicast)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
79268 packets output, 3804656 bytes, 0 underruns
0 output errors, 0 interface resets
0 output buffer failures, 0 output buffers swapped out
ba'c gan' vlan 10 vao` interface ge3/23 roi thi no chung` Mac la cai cha'c