Home>

I'm currently learning a network using a cisco router.
This device does not seem to assign an IP address directly to the interface, so after setting vlan, assign an IP address to it and assign an interface.
Assuming that Gi0/1 and the PC are connected, is it correct to recognize that the interface of the router connected to the PC from the perspective of the PC is "vlan2" in this case?
If i can assign the ip directly to Gi0/1, you can see that the interface of the router is "Gi0/1" without setting vlan.

I'm sorry if you have asked a question you don't understand.
I would appreciate it if you could answer.

  • Answer # 1

    First, there is no need for a one-to-one correspondence between the interface and the IP address.
    Since another question mentions words such as eth0, you may have an image of network management on a server/PC such as Linux, but on Cisco routers,

    VLAN can follow multiple interfaces

    VLAN has an IP address

    Therefore, the IP address and the interface are not directly linked.

    In Linux, if you use the function called bridge, the configuration will be similar.
    For example

    Bridge br0 follows interfaces eth0, eth1

    br0 has an IP address
    * Eth0 and eth1 themselves do not have an address

    Can be set. In this case, the Linux machine behaves like a switch with ports corresponding to eth0 and eth1.

  • Answer # 2

    From the PC side, I do not know the other party's convenience. Only the opposite MAC address can be known from the PC side. ARP associates the MAC address with the IP address. So you can guess the IP address as well (although it may be relayed).

    If a tagged VLAN (trunk port in Cisco) is used, the opposite device also shares the VLAN-ID. However, this is not for PC opponents (Switches, etc.).