IPv6: Display IPv6 Address yang ada: Difference between revisions
From OnnoCenterWiki
Jump to navigationJump to search
Onnowpurbo (talk | contribs) New page: 6.1. Displaying existing IPv6 addresses First you should check, whether and which IPv6 addresses are already configured (perhaps auto-magically during stateless auto-configuration). 6.1.1... |
Onnowpurbo (talk | contribs) No edit summary |
||
| Line 6: | Line 6: | ||
Usage: | Usage: | ||
# /sbin/ip -6 addr show dev <interface> | # /sbin/ip -6 addr show dev <interface> | ||
Example for a static configured host: | Example for a static configured host: | ||
# /sbin/ip -6 addr show dev eth0 | # /sbin/ip -6 addr show dev eth0 | ||
2: eth0: <BROADCAST,MULTICAST,UP | |||
inet6 | 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000 | ||
inet6 2001: | inet6 2001:470:36:ab6::4f0/128 scope global | ||
inet6 | inet6 2001:470:36:ab6:e47e:a439:2e5d:44a4/64 scope global temporary dynamic | ||
inet6 2001:470:36:ab6:62a4:4cff:fe75:a6a0/64 scope global dynamic | |||
inet6 fe80::62a4:4cff:fe75:a6a0/64 scope link | |||
Example for a host which is auto-configured | Example for a host which is auto-configured | ||
| Line 20: | Line 22: | ||
Here you see some auto-magically configured IPv6 addresses and their lifetime. | Here you see some auto-magically configured IPv6 addresses and their lifetime. | ||
# /sbin/ip -6 addr show dev eth0 | # /sbin/ip -6 addr show dev eth0 | ||
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000 | |||
inet6 | inet6 2001:470:36:ab6::4f0/128 scope global | ||
valid_lft | valid_lft forever preferred_lft forever | ||
inet6 | inet6 2001:470:36:ab6:e47e:a439:2e5d:44a4/64 scope global temporary dynamic | ||
valid_lft | valid_lft 6974sec preferred_lft 1574sec | ||
inet6 2001:470:36:ab6:62a4:4cff:fe75:a6a0/64 scope global dynamic | |||
valid_lft 6974sec preferred_lft 1574sec | |||
inet6 fe80::62a4:4cff:fe75:a6a0/64 scope link | |||
valid_lft forever preferred_lft forever | |||
6.1.2. Using "ifconfig" | 6.1.2. Using "ifconfig" | ||
| Line 33: | Line 38: | ||
Usage: | Usage: | ||
# /sbin/ifconfig <interface> | # /sbin/ifconfig <interface> | ||
Example (output filtered with grep to display only IPv6 addresses). Here you see different IPv6 addresses with different scopes. | Example (output filtered with grep to display only IPv6 addresses). Here you see different IPv6 addresses with different scopes. | ||
# /sbin/ifconfig eth0 |grep "inet6 addr:" | # /sbin/ifconfig eth0 |grep "inet6 addr:" | ||
inet6 addr: | |||
inet6 addr: 2001: | inet6 addr: 2001:470:36:ab6:62a4:4cff:fe75:a6a0/64 Scope:Global | ||
inet6 addr: | inet6 addr: 2001:470:36:ab6:e47e:a439:2e5d:44a4/64 Scope:Global | ||
inet6 addr: fe80::62a4:4cff:fe75:a6a0/64 Scope:Link | |||
inet6 addr: 2001:470:36:ab6::4f0/128 Scope:Global | |||
Revision as of 02:40, 26 June 2013
6.1. Displaying existing IPv6 addresses
First you should check, whether and which IPv6 addresses are already configured (perhaps auto-magically during stateless auto-configuration). 6.1.1. Using "ip"
Usage:
# /sbin/ip -6 addr show dev <interface>
Example for a static configured host:
# /sbin/ip -6 addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
inet6 2001:470:36:ab6::4f0/128 scope global
inet6 2001:470:36:ab6:e47e:a439:2e5d:44a4/64 scope global temporary dynamic
inet6 2001:470:36:ab6:62a4:4cff:fe75:a6a0/64 scope global dynamic
inet6 fe80::62a4:4cff:fe75:a6a0/64 scope link
Example for a host which is auto-configured
Here you see some auto-magically configured IPv6 addresses and their lifetime.
# /sbin/ip -6 addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
inet6 2001:470:36:ab6::4f0/128 scope global
valid_lft forever preferred_lft forever
inet6 2001:470:36:ab6:e47e:a439:2e5d:44a4/64 scope global temporary dynamic
valid_lft 6974sec preferred_lft 1574sec
inet6 2001:470:36:ab6:62a4:4cff:fe75:a6a0/64 scope global dynamic
valid_lft 6974sec preferred_lft 1574sec
inet6 fe80::62a4:4cff:fe75:a6a0/64 scope link
valid_lft forever preferred_lft forever
6.1.2. Using "ifconfig"
Usage:
# /sbin/ifconfig <interface>
Example (output filtered with grep to display only IPv6 addresses). Here you see different IPv6 addresses with different scopes.
# /sbin/ifconfig eth0 |grep "inet6 addr:"
inet6 addr: 2001:470:36:ab6:62a4:4cff:fe75:a6a0/64 Scope:Global inet6 addr: 2001:470:36:ab6:e47e:a439:2e5d:44a4/64 Scope:Global inet6 addr: fe80::62a4:4cff:fe75:a6a0/64 Scope:Link inet6 addr: 2001:470:36:ab6::4f0/128 Scope:Global