Różnice między wybraną wersją a wersją aktualną.
Both sides previous revision Poprzednia wersja Nowa wersja | Poprzednia wersja | ||
sk1:vlan [2018/05/09 14:06] jkonczak [Konfiguracja na Linuksie] |
sk1:vlan [2020/05/19 13:18] jkonczak [Konfiguracja switchy CISCO] |
||
---|---|---|---|
Linia 35: | Linia 35: | ||
* ''enable'' – wejście w tryb uprzywilejowany | * ''enable'' – wejście w tryb uprzywilejowany | ||
* tryb uprzywilejowany ''#'' | * tryb uprzywilejowany ''#'' | ||
+ | * ''show interfaces status'' – pokazanie listę i stan interfejsów | ||
* ''configure terminal'' (''conf t'') – wejście w tryb konfiguracji | * ''configure terminal'' (''conf t'') – wejście w tryb konfiguracji | ||
* ''show vlan [brief]'' (''sh vlan [br]'') – pokazanie konfiguracji vlanów | * ''show vlan [brief]'' (''sh vlan [br]'') – pokazanie konfiguracji vlanów | ||
* ''show interfaces trunk'' – pokazanie aktywnych połączeń typu trunk | * ''show interfaces trunk'' – pokazanie aktywnych połączeń typu trunk | ||
+ | * tryb konfiguracji ''(config)#'' | ||
* <html><small></html>''vlan <nr_vlana>'' – wejście w konfigurację sieci vlan <html></small></html> | * <html><small></html>''vlan <nr_vlana>'' – wejście w konfigurację sieci vlan <html></small></html> | ||
* <html><small></html> ''name <nazwa>'' – nazwanie vlana <html></small></html> | * <html><small></html> ''name <nazwa>'' – nazwanie vlana <html></small></html> | ||
- | * tryb konfiguracji ''(config)#'' | ||
* ''interface <nazwa_interfejsu>'' – konfiguracja interfejsu, np. \\ ''interface //FastEthernet 0/1//'' (''interface //Fa0/1//'') | * ''interface <nazwa_interfejsu>'' – konfiguracja interfejsu, np. \\ ''interface //FastEthernet 0/1//'' (''interface //Fa0/1//'') | ||
* ''interface range <lista interfejsów>'' – konfiguracja wielu interfejsów naraz, np. \\ ''interface range //FastEthernet 0/1-5, FastEthernet 0/11-15//'' | * ''interface range <lista interfejsów>'' – konfiguracja wielu interfejsów naraz, np. \\ ''interface range //FastEthernet 0/1-5, FastEthernet 0/11-15//'' | ||
Linia 155: | Linia 156: | ||
* ''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>++++ |