Różnice między wybraną wersją a wersją aktualną.
Both sides previous revision Poprzednia wersja | Nowa wersja Both sides next revision | ||
sk1:vlan [2018/05/09 14:06] jkonczak [Konfiguracja na Linuksie] |
sk1:vlan [2018/05/09 14:24] jkonczak [Konfiguracja routerów CISCO] |
||
---|---|---|---|
Linia 155: | Linia 155: | ||
* ''no shut''– żeby podinterfejs działał, trzeba włączyć cały interfejs | * ''no shut''– żeby podinterfejs działał, trzeba włączyć cały interfejs | ||
+ | ++++ Przykładowa konfiguracja routera CISCO: | | ||
+ | <html><pre> | ||
+ | R1# | ||
+ | R1#conf t | ||
+ | R1(config)#<span title="Stworzenie na eth0 podinterfejsu dopiętego do sieci o identyfikatorze 10" style="background-color:rgba(0,255,255,0.2)">interface GigabitEthernet 0/0.10</span> | ||
+ | R1(config-subif)#<span title="Stworzenie na eth0 podinterfejsu dopiętego do sieci o identyfikatorze 10" style="background-color:rgba(0,255,255,0.2)">encapsulation dot1Q 10</span> | ||
+ | R1(config-subif)#<span title="Ustawienie IP z odpowiedniej sieci" style="background-color:rgba(0,0,0,0.1)">ip address 192.168.10.254 255.255.255.0</span> | ||
+ | R1(config-subif)#exit | ||
+ | R1(config)#<span title="Stworzenie na eth0 podinterfejsu dopiętego do sieci o identyfikatorze 20" style="background-color:rgba(255,255,0,0.4)">interface GigabitEthernet 0/0.20</span> | ||
+ | R1(config-subif)#<span title="Stworzenie na eth0 podinterfejsu dopiętego do sieci o identyfikatorze 20" style="background-color:rgba(255,255,0,0.4)">encapsulation dot1Q 20</span> | ||
+ | R1(config-subif)#<span title="Ustawienie IP z odpowiedniej sieci" style="background-color:rgba(0,0,0,0.1)">ip address 192.168.20.254 255.255.255.0</span> | ||
+ | R1(config-subif)#exit | ||
+ | R1(config)#interface GigabitEthernet 0/0 | ||
+ | R1(config-if)#<span title="Włączenie interfejsów" style="background-color:rgba(0,0,0,0.1)">no shutdown</span> | ||
+ | R1(config-if)#end | ||
+ | R1#sh ip interface brief | ||
+ | Interface IP-Address OK? Method Status Protocol | ||
+ | GigabitEthernet0/0 unassigned YES unset up up | ||
+ | GigabitEthernet0/0.10 192.168.10.254 YES manual up up | ||
+ | GigabitEthernet0/0.20 192.168.20.254 YES manual up up | ||
+ | GigabitEthernet1/0 unassigned YES unset administratively down down | ||
+ | R1#show interfaces GigabitEthernet 0/0.10 | ||
+ | <span style="background-color:rgba(0,255,255,0.2)">GigabitEthernet0/0.10</span> is up, line protocol is up | ||
+ | Hardware is i82543 (Livengood), address is ca03.485d.0008 (bia ca03.485d.0008) | ||
+ | Internet address is 192.168.10.254/24 | ||
+ | MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec, | ||
+ | reliability 255/255, txload 1/255, rxload 1/255 | ||
+ | <span style="background-color:rgba(0,255,255,0.2)">Encapsulation 802.1Q Virtual LAN, Vlan ID 10.</span> | ||
+ | ARP type: ARPA, ARP Timeout 04:00:00 | ||
+ | Last clearing of "show interface" counters never | ||
+ | R1#show interfaces GigabitEthernet 0/0 | ||
+ | GigabitEthernet0/0 is up, line protocol is up | ||
+ | Hardware is i82543 (Livengood), address is ca03.485d.0008 (bia ca03.485d.0008) | ||
+ | MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec, | ||
+ | reliability 255/255, txload 1/255, rxload 1/255 | ||
+ | <span title="Pakiety z native VLAN – domyślnie VLAN 1 – będą odbierane na głównym interfejsie" style="background-color:rgba(0,0,0,0.1)">Encapsulation 802.1Q Virtual LAN, Vlan ID 1., loopback not set</span> | ||
+ | ... | ||
+ | </pre></html>++++ |