连网技术与网络管理 作业4

发布时间 2023-06-02 19:14:12作者: ChuckLu

What's Gig0/0.1 and Gig0/0.2? I can only find Gig0/0,Gig0/1 and Gig0/3

Gig0/0.1 and Gig0/0.2 are subinterfaces of the GigabitEthernet0/0 interface. These subinterfaces are created using a feature called "802.1Q VLAN trunking" or "router-on-a-stick" configuration.

In this configuration, a single physical interface (in this case, GigabitEthernet0/0) is divided into multiple logical interfaces, each representing a different VLAN. The subinterfaces are identified using a dot notation, where the number after the dot represents the VLAN ID.

For example, in the configuration you mentioned, Gig0/0.1 and Gig0/0.2 represent two different VLANs. The ".1" and ".2" indicate VLAN IDs assigned to those subinterfaces. The actual VLAN configuration for these subinterfaces is typically done in the router's configuration.

By using VLAN subinterfaces, a router can handle traffic from multiple VLANs on a single physical interface. Each subinterface is associated with a specific VLAN and can have its own IP address and configuration, allowing the router to route traffic between different VLANs.

It's worth noting that the availability of subinterfaces and the specific naming convention may vary depending on the router platform and software version. It's always recommended to refer to the router's documentation or consult the manufacturer's resources for accurate and detailed information on subinterface configuration and support.

How can I create such sub interfaces?

To create subinterfaces on a Cisco router, you can follow these steps:

  1. Access the router's configuration mode: Enter privileged EXEC mode by typing enable and providing the appropriate password if required. Then enter global configuration mode by typing configure terminal or simply conf t.

  2. Navigate to the physical interface: Identify the physical interface you want to create subinterfaces for. In your case, it is GigabitEthernet0/0. Use the following command to access the interface configuration:

    kotlin
  3. interface GigabitEthernet0/0
  4. Create the subinterfaces: To create a subinterface, use the following command:

    csharp
  5. interface GigabitEthernet0/0.<vlan-id>

    Replace <vlan-id> with the desired VLAN ID for the subinterface. Repeat this command for each subinterface you want to create.

  6. Configure the subinterface: Once you are in the subinterface configuration mode, you can configure various parameters such as IP address, VLAN encapsulation, and access control lists (ACLs). For example, to configure an IP address for the subinterface, use the following command:

    css
  1. ip address <ip-address> <subnet-mask>

    Replace <ip-address> with the desired IP address and <subnet-mask> with the appropriate subnet mask for the subinterface.

  2. Repeat steps 3 and 4 for each subinterface: If you want to create multiple subinterfaces, repeat steps 3 and 4 for each subinterface, configuring the desired parameters as needed.

  3. Exit configuration mode and save changes: Once you have finished configuring the subinterfaces, exit configuration mode by typing end or exit. Save the configuration changes by typing write or copy running-config startup-config.

Please note that the exact commands and syntax may vary depending on the router model and software version you are using. It's always recommended to refer to the router's documentation or consult the manufacturer's resources for specific instructions related to your device.