User Tools

Site Tools


использование_протокола_802.1q

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
использование_протокола_802.1q [2022/03/09 13:21]
val [Настройка интерфейсов]
использование_протокола_802.1q [2024/06/24 11:13] (current)
val [Настройка интерфейсов]
Line 37: Line 37:
 ==== Настройка интерфейсов ==== ==== Настройка интерфейсов ====
 <​code>​ <​code>​
-!!!switch1#+!!!switch1_2#
 conf terminal conf terminal
  
 interface FastEthernet0/​1 interface FastEthernet0/​1
-! desc Linux server+! desc linux server
 ! switchport trunk encapsulation dot1q   ! для старых серий, в GNS3 не нужно ! switchport trunk encapsulation dot1q   ! для старых серий, в GNS3 не нужно
  ​switchport mode trunk  ​switchport mode trunk
 +
 +
 +
  
 interface FastEthernet0/​2 interface FastEthernet0/​2
-! desc win client1+! desc windows ​client1
  ​switchport mode access  ​switchport mode access
  ​switchport access vlan 2  ​switchport access vlan 2
Line 52: Line 55:
  
  
-!interface FastEthernet0/​2 +ИЛИ
-! desc uplink to switch3 +
-! switchport mode trunk+
  
 +
 +interface FastEthernet0/​2
 + desc uplink to switch3
 + ​switchport mode trunk
  
 !!!switch3# !!!switch3#
-!interface Port-channel1 +interface Port-channel1 
-desc uplink to switch1 and switch2 + desc uplink to CORE (switch1 and switch2) 
-switchport mode trunk+ ​switchport mode trunk 
 + 
 +interface FastEthernet0/​2 
 +!interface range f0/2 - 4 
 +! desc windows client1 
 + ​switchport mode access 
 + ​switchport access vlan 2
 </​code>​ </​code>​
  
 ===== Настройка Linux системы ===== ===== Настройка Linux системы =====
  
-==== Debian/​Ubuntu ====+!!! При использовании в системе docker потребовалась перезагрузка 
 <​code>​ <​code>​
-root@server:​~# cat /​etc/​sysctl.conf+linuxgate# cat /​etc/​sysctl.conf
 </​code><​code>​ </​code><​code>​
 ... ...
Line 74: Line 86:
 </​code><​code>​ </​code><​code>​
 # sysctl -f # sysctl -f
 +</​code>​
  
 +==== Debian ifupdown ====
 +
 +<​code>​
 root@server:​~#​ apt install vlan root@server:​~#​ apt install vlan
  
Line 86: Line 102:
         mtu 1500         mtu 1500
         vlan_raw_device eth1         vlan_raw_device eth1
-#        vlan_raw_device ​eth0+#        vlan_raw_device ​bond0
 </​code><​code>​ </​code><​code>​
 root@server:​~#​ ifup vlan2 root@server:​~#​ ifup vlan2
Line 93: Line 109:
 root@server:​~#​ vconfig rem vlan2 root@server:​~#​ vconfig rem vlan2
 Removed VLAN -:vlan2:- Removed VLAN -:vlan2:-
 +</​code>​
 +
 +==== Ubuntu netplan ====
 +
 +  * [[https://​itproffi.ru/​nastrojka-seti-cherez-netplan-v-ubuntu-17-10-i-vyshe/​|Настройка сети через Netplan в Ubuntu 17.10 и выше]]
 +
 +<​code>​
 +server# cat /​etc/​netplan/​01-netcfg.yaml
 +</​code><​code>​
 +...
 +  vlans:
 +    vlan2:
 +      id: 2
 +      link: bond0
 +      addresses: [192.168.100+X.1/​24]
 +</​code><​code>​
 +server# netplan apply
 </​code>​ </​code>​
  
использование_протокола_802.1q.1646821275.txt.gz · Last modified: 2022/03/09 13:21 by val