Formulir Kontak

Nama

Email *

Pesan *

Cari Blog Ini

Ipconfig Command Kali Linux

The ip a Command and ip addr show Command Give the Same Output

Introduction

The `ip a` and `ip addr show` commands are both used to display the IP addresses of a network interface. However, there are some subtle differences between the two commands.

IP Addressing

The `ip a` command displays the IP addresses of all network interfaces, including virtual interfaces. The `ip addr show` command, on the other hand, only displays the IP addresses of physical network interfaces.

For example, the following `ip a` command displays the IP addresses of all network interfaces on a system:

``` ip a ```

Output:

``` 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp0s3: mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:50:56:c0:00:08 brd ff:ff:ff:ff:ff:ff inet 192.168.1.10/24 brd 192.168.1.255 scope global enp0s3 valid_lft forever preferred_lft forever inet6 fe80::250:56ff:fec0:8/64 scope link valid_lft forever preferred_lft forever ```

The `ip addr show` command, on the other hand, only displays the IP addresses of physical network interfaces:

``` ip addr show ```

Output:

``` 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever ```

Interface Information

The `ip a` command displays more information about network interfaces than the `ip addr show` command. This information includes the interface name, the MAC address, the MTU, and the qdisc.

For example, the following `ip a` command displays the interface name, the MAC address, the MTU, and the qdisc for the `enp0s3` interface:

``` ip a show enp0s3 ```

Output:

``` 2: enp0s3: mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:50:56:c0:00:08 brd ff:ff:ff:ff:ff:ff inet 192.168.1.10/24 brd 192.168.1.255 scope global enp0s3 valid_lft forever preferred_lft forever inet6 fe80::250:56ff:fec0:8/64 scope link valid_lft forever preferred_lft forever ``` The `ip addr show` command, on the other hand, only displays the IP addresses of the interface.

Conclusion

The `ip a` and `ip addr show` commands are both useful for displaying the IP addresses of network interfaces. However, the `ip a` command displays more information about network interfaces than the `ip addr show` command.


Komentar