Print this page
Clearview IPMP manpages
| Split |
Close |
| Expand all |
| Collapse all |
--- old/./ifconfig.txt
+++ new/./ifconfig.txt
1 -
2 -
3 -
4 1 System Administration Commands ifconfig(1M)
5 2
6 3
7 4
8 5 NAME
9 6 ifconfig - configure network interface parameters
10 7
11 8 SYNOPSIS
12 9 ifconfig interface [address_family] [address [/prefix_length]
13 10 [dest_address]] [addif address [/prefix_length]]
14 11 [removeif address [/prefix_length]] [arp | -arp]
15 12 [auth_algs authentication algorithm] [encr_algs encryption algorithm]
16 13 [encr_auth_algs authentication algorithm] [auto-revarp]
17 14 [broadcast address] [deprecated | -deprecated]
18 15 [preferred | -preferred] [destination dest_address]
19 16 [ether [address]] [failover | -failover] [group
20 - [name | ""]] [index if_index] [metric n] [modlist]
17 + [name | ""]] [index if_index] [ipmp] [metric n] [modlist]
21 18 [modinsert mod_name@pos] [modremove mod_name@pos]
22 19 [mtu n] [netmask mask] [plumb] [unplumb] [private
23 20 | -private] [nud | -nud] [set [address] [/netmask]]
24 21 [standby | -standby] [subnet subnet_address] [tdst
25 22 tunnel_dest_address] [token address/prefix_length]
26 23 [tsrc tunnel_src_address] [trailers | -trailers]
27 24 [up] [down] [usesrc [name | none]] [xmit | -xmit]
28 25 [encaplimit n | -encaplimit] [thoplimit n] [router
29 26 | -router] [zone zonename | -zone | -all-zones]
30 27
31 28
32 29 ifconfig [address_family] interface {auto-dhcp | dhcp} [primary]
33 30 [wait seconds] drop | extend | inform | ping
34 31 | release | start | status
35 32
36 33
37 34 DESCRIPTION
38 35 The command ifconfig is used to assign an address to a net-
39 36 work interface and to configure network interface parame-
40 37 ters. The ifconfig command must be used at boot time to
41 38 define the network address of each interface present on a
42 39 machine; it may also be used at a later time to redefine an
43 40 interface's address or other operating parameters. If no
44 41 option is specified, ifconfig displays the current confi-
45 42 guration for a network interface. If an address family is
46 43 specified, ifconfig reports only the details specific to
47 44 that address family. Only privileged users may modify the
48 45 configuration of a network interface. Options appearing
49 46 within braces ({}) indicate that one of the options must be
50 47 specified.
51 48
52 49 DHCP Configuration
53 50 The forms of ifconfig that use the auto-dhcp or dhcp argu-
54 51 ments are used to control the Dynamic Host Configuration
55 52 Protocol ("DHCP") configuration of the interface. In this
56 53 mode, ifconfig is used to control operation of
57 54 dhcpagent(1M), the DHCP client daemon. Once an interface is
58 55 placed under DHCP control by using the start operand, ifcon-
59 56 fig should not, in normal operation, be used to modify the
60 57
61 58
62 59
63 60 SunOS 5.11 Last change: 21 Jan 2007 1
64 61
65 62
66 63
67 64
68 65
69 66
70 67 System Administration Commands ifconfig(1M)
71 68
72 69
73 70
|
↓ open down ↓ |
43 lines elided |
↑ open up ↑ |
74 71 address or characteristics of the interface. If the address
75 72 of an interface under DHCP is changed, dhcpagent will remove
76 73 the interface from its control.
77 74
78 75 OPTIONS
79 76 The following options are supported:
80 77
81 78 addif address
82 79
83 80 Create the next unused logical interface on the speci-
84 - fied physical interface. If the physical interface is
85 - part of a multipathing group, the logical interface can
86 - be added to a different physical interface in the same
87 - group.
81 + fied physical interface.
88 82
89 -
90 83 all-zones
91 84
92 85 Make the interface available to every shared-IP zone on
93 86 the system. The appropriate zone to which to deliver
94 87 data is determined using the tnzonecfg database. This
95 88 option is available only if the system is configured
96 89 with the Solaris Trusted Extensions feature.
97 90
98 91 The tnzonecfg database is described in the tnzonecfg(4)
99 92 man page, which is part of the Solaris Trusted Exten-
100 93 sions Reference Manual.
101 94
102 95
103 96 anycast
104 97
105 98 Marks the logical interface as an anycast address by
106 99 setting the ANYCAST flag. See "INTERFACE FLAGS," below,
107 100 for more information on anycast.
108 101
109 102
110 103 -anycast
111 104
112 105 Marks the logical interface as not an anycast address by
113 106 clearing the ANYCAST flag.
114 107
115 108
116 109 arp
117 110
118 111 Enable the use of the Address Resolution Protocol
119 112 ("ARP") in mapping between network level addresses and
120 113 link level addresses (default). This is currently imple-
121 114 mented for mapping between IPv4 addresses and MAC
122 115 addresses.
123 116
124 117
125 118
126 119
127 120
128 121
129 122 SunOS 5.11 Last change: 21 Jan 2007 2
130 123
131 124
132 125
|
↓ open down ↓ |
33 lines elided |
↑ open up ↑ |
133 126
134 127
135 128
136 129 System Administration Commands ifconfig(1M)
137 130
138 131
139 132
140 133 -arp
141 134
142 135 Disable the use of the ARP on a physical interface.
136 + ARP cannot be disabled on an IPMP IP interface.
143 137
144 138
145 139 auth_algs authentication algorithm
146 140
147 141 For a tunnel, enable IPsec AH with the authentication
148 142 algorithm specified. The algorithm can be either a
149 143 number or an algorithm name, including any to express no
150 144 preference in algorithm. All IPsec tunnel properties
151 145 must be specified on the same command line. To disable
152 146 tunnel security, specify an auth_alg of none.
153 147
154 148 It is now preferable to use the ipsecconf(1M) command
155 149 when configuring a tunnel's security properties. If
156 150 ipsecconf was used to set a tunnel's security proper-
157 151 ties, this keyword will not affect the tunnel.
158 152
159 153
160 154 auto-dhcp
161 155
162 156 Use DHCP to automatically acquire an address for this
163 157 interface. This option has a completely equivalent alias
164 158 called dhcp.
165 159
166 160 For IPv6, the interface specified must be the zeroth
167 161 logical interface (the physical interface name), which
168 162 has the link-local address.
169 163
170 164 primary
171 165
172 166 Defines the interface as the primary. The interface
173 167 is defined as the preferred one for the delivery of
174 168 client-wide configuration data. Only one interface
175 169 can be the primary at any given time. If another
176 170 interface is subsequently selected as the primary,
177 171 it replaces the previous one. Nominating an inter-
178 172 face as the primary one will not have much signifi-
179 173 cance once the client work station has booted, as
180 174 many applications will already have started and been
181 175 configured with data read from the previous primary
182 176 interface.
183 177
184 178
185 179 wait seconds
186 180
187 181 The ifconfig command will wait until the operation
188 182 either completes or for the interval specified,
189 183 whichever is the sooner. If no wait interval is
190 184 given, and the operation is one that cannot complete
191 185 immediately, ifconfig will wait 30 seconds for the
192 186
193 187
194 188
195 189 SunOS 5.11 Last change: 21 Jan 2007 3
196 190
197 191
198 192
199 193
200 194
201 195
202 196 System Administration Commands ifconfig(1M)
203 197
204 198
205 199
206 200 requested operation to complete. The symbolic value
207 201 forever may be used as well, with obvious meaning.
208 202
209 203
210 204 drop
211 205
212 206 Remove the specified interface from DHCP control
213 207 without notifying the DHCP server, and record the
214 208 current lease for later use. Additionally, for IPv4,
215 209 set the IP address to zero and mark the interface as
216 210 "down." For IPv6, unplumb all logical interfaces
217 211 plumbed by dhcpagent.
218 212
219 213
220 214 extend
221 215
222 216 Attempt to extend the lease on the interface's IP
223 217 address. This is not required, as the agent will
224 218 automatically extend the lease well before it
225 219 expires.
226 220
227 221
228 222 inform
229 223
230 224 Obtain network configuration parameters from DHCP
231 225 without obtaining a lease on IP addresses. This is
232 226 useful in situations where an IP address is obtained
233 227 through mechanisms other than DHCP.
234 228
235 229
236 230 ping
237 231
238 232 Check whether the interface given is under DHCP con-
239 233 trol, which means that the interface is managed by
240 234 the DHCP agent and is working properly. An exit
241 235 status of 0 means success.
242 236
243 237
244 238 release
245 239
246 240 Relinquish the IP addresses on the interface by
247 241 notifying the server and discard the current lease.
248 242 For IPv4, mark the interface as "down." For IPv6,
249 243 all logical interfaces plumbed by dhcpagent are
250 244 unplumbed.
251 245
252 246
253 247 start
254 248
255 249 Start DHCP on the interface.
256 250
257 251
258 252
259 253
260 254
261 255 SunOS 5.11 Last change: 21 Jan 2007 4
262 256
263 257
264 258
265 259
266 260
267 261
268 262 System Administration Commands ifconfig(1M)
269 263
270 264
271 265
272 266 status
273 267
274 268 Display the DHCP configuration status of the inter-
275 269 face.
276 270
277 271
278 272
279 273 auto-revarp
280 274
281 275 Use the Reverse Address Resolution Protocol (RARP) to
282 276 automatically acquire an address for this interface.
283 277 This will fail if the interface does not support RARP;
284 278 for example, IPoIB (IP over InfiniBand), and on IPv6
285 279 interfaces.
286 280
287 281
288 282 broadcast address
289 283
290 284 For IPv4 only. Specify the address to use to represent
291 285 broadcasts to the network. The default broadcast address
292 286 is the address with a host part of all 1's. A "+" (plus
293 287 sign) given for the broadcast value causes the broadcast
294 288 address to be reset to a default appropriate for the
295 289 (possibly new) address and netmask. The arguments of
296 290 ifconfig are interpreted left to right. Therefore
297 291
298 292 example% ifconfig -a netmask + broadcast +
299 293
300 294
301 295 and
302 296
303 297 example% ifconfig -a broadcast + netmask +
304 298
305 299
306 300 may result in different values being assigned for the
307 301 broadcast addresses of the interfaces.
308 302
309 303
310 304 deprecated
311 305
312 306 Marks the logical interface as deprecated. An address
313 307 associated with a deprecated interface will not be used
314 308 as source address for outbound packets unless either
315 309 there are no other addresses available on the interface
316 310 or the application has bound to this address explicitly.
317 311 The status display shows DEPRECATED as part of flags.
318 312 See for information on the flags supported by ifconfig.
319 313
320 314
321 315 -deprecated
322 316
323 317 Marks a logical interface as not deprecated. An address
324 318
325 319
326 320
327 321 SunOS 5.11 Last change: 21 Jan 2007 5
328 322
329 323
330 324
331 325
332 326
333 327
334 328 System Administration Commands ifconfig(1M)
335 329
336 330
337 331
338 332 associated with such an interface could be used as a
339 333 source address for outbound packets.
340 334
341 335
342 336 preferred
343 337
344 338 Marks the logical interface as preferred. This option is
345 339 only valid for IPv6 addresses. Addresses assigned to
346 340 preferred logical interfaces are preferred as source
347 341 addresses over all other addresses configured on the
348 342 system, unless the address is of an inappropriate scope
349 343 relative to the destination address. Preferred addresses
350 344 are used as source addresses regardless of which physi-
351 345 cal interface they are assigned to. For example, you can
352 346 configure a preferred source address on the loopback
353 347 interface and advertise reachability of this address by
354 348 using a routing protocol.
355 349
356 350
357 351 -preferred
358 352
359 353 Marks the logical interface as not preferred.
360 354
361 355
362 356 destination dest_address
363 357
364 358 Set the destination address for a point-to point inter-
365 359 face.
366 360
367 361
368 362 dhcp
369 363
370 364 This option is an alias for option auto-dhcp
371 365
372 366
373 367 down
374 368
375 369 Mark a logical interface as "down". (That is, turn off
376 370 the IFF_UP bit.) When a logical interface is marked
377 371 "down," the system does not attempt to use the address
378 372 assigned to that interface as a source address for out-
379 373 bound packets and will not recognize inbound packets
380 374 destined to that address as being addressed to this
381 375 host. Additionally, when all logical interfaces on a
382 376 given physical interface are "down," the physical inter-
383 377 face itself is disabled.
384 378
385 379 When a logical interface is down, all routes that
386 380 specify that interface as the output (using the -ifp
387 381 option in the route(1M) command or RTA_IFP in a
388 382 route(7P) socket) are removed from the forwarding table.
389 383 Routes marked with RTF_STATIC are returned to the table
390 384
391 385
392 386
393 387 SunOS 5.11 Last change: 21 Jan 2007 6
394 388
395 389
396 390
397 391
398 392
399 393
400 394 System Administration Commands ifconfig(1M)
401 395
402 396
403 397
404 398 if the interface is brought back up, while routes not
405 399 marked with RTF_STATIC are simply deleted.
406 400
407 401 When all logical interfaces that could possibly be used
408 402 to reach a particular gateway address are brought down
409 403 (specified without the interface option as in the previ-
410 404 ous paragraph), the affected gateway routes are treated
411 405 as though they had the RTF_BLACKHOLE flag set. All
412 406 matching packets are discarded because the gateway is
413 407 unreachable.
414 408
415 409
416 410 encaplimit n
417 411
418 412 Set the tunnel encapsulation limit for the interface to
419 413 n. This option applies to IPv4-in-IPv6 and IPv6-in-IPv6
420 414 tunnels only. The tunnel encapsulation limit controls
421 415 how many more tunnels a packet may enter before it
422 416 leaves any tunnels, that is, the tunnel nesting level.
423 417
424 418
425 419 -encaplimit
426 420
427 421 Disable generation of the tunnel encapsulation limit.
428 422 This option applies only to IPv4-in-IPv6 and IPv6-in-
429 423 IPv6 tunnels.
430 424
431 425
432 426 encr_auth_algs authentication algorithm
433 427
434 428 For a tunnel, enable IPsec ESP with the authentication
435 429 algorithm specified. It can be either a number or an
436 430 algorithm name, including any or none, to indicate no
437 431 algorithm preference. If an ESP encryption algorithm is
438 432 specified but the authentication algorithm is not, the
439 433 default value for the ESP authentication algorithm will
440 434 be any.
441 435
442 436 It is now preferable to use the ipsecconf(1M) command
443 437 when configuring a tunnel's security properties. If
444 438 ipsecconf was used to set a tunnel's security proper-
445 439 ties, this keyword will not affect the tunnel.
446 440
447 441
448 442 encr_algs encryption algorithm
449 443
450 444 For a tunnel, enable IPsec ESP with the encryption algo-
451 445 rithm specified. It can be either a number or an algo-
452 446 rithm name. Note that all IPsec tunnel properties must
453 447 be specified on the same command line. To disable tunnel
454 448 security, specify the value of encr_alg as none. If an
455 449 ESP authentication algorithm is specified, but the
456 450
457 451
458 452
459 453 SunOS 5.11 Last change: 21 Jan 2007 7
460 454
461 455
462 456
463 457
464 458
465 459
466 460 System Administration Commands ifconfig(1M)
467 461
468 462
469 463
470 464 encryption algorithm is not, the default value for the
471 465 ESP encryption will be null.
|
↓ open down ↓ |
319 lines elided |
↑ open up ↑ |
472 466
473 467 It is now preferable to use the ipsecconf(1M) command
474 468 when configuring a tunnel's security properties. If
475 469 ipsecconf was used to set a tunnel's security proper-
476 470 ties, this keyword will not affect the tunnel.
477 471
478 472
479 473 ether [ address ]
480 474
481 475 If no address is given and the user is root or has suf-
482 - ficient privileges to open the underlying device, then
476 + ficient privileges to open the underlying datalink, then
483 477 display the current Ethernet address information.
484 478
485 479 Otherwise, if the user is root or has sufficient
486 480 privileges, set the Ethernet address of the interfaces
487 481 to address. The address is an Ethernet address
488 482 represented as x:x:x:x:x:x where x is a hexadecimal
489 483 number between 0 and FF. Similarly, for the IPoIB (IP
490 484 over InfiniBand) interfaces, the address will be 20
491 485 bytes of colon-separated hex numbers between 0 and FF.
492 486
493 - Some, though not all, Ethernet interface cards have
487 + Some, though not all, Ethernet interface cards have
494 488 their own addresses. To use cards that do not have their
495 - own addresses, refer to section 3.2.3(4) of the IEEE
489 + own addresses, refer to section 3.2.3(4) of the IEEE
496 490 802.3 specification for a definition of the locally
497 - administered address space. The use of multipathing
498 - groups should be restricted to those cards with their
499 - own addresses (see MULTIPATHING GROUPS).
491 + administered address space. Note that all IP interfaces
492 + in an IPMP group must have unique hardware addresses;
493 + see *in.mpathd(1M)*.
500 494
501 495
502 496 -failover
503 497
504 - Mark the logical interface as a non-failover interface.
505 - Addresses assigned to non-failover logical interfaces
506 - will not failover when the interface fails. Status
507 - display shows NOFAILOVER as part of flags.
498 + Set *NOFAILOVER* on the logical interface. This makes
499 + the associated address available for use by *in.mpathd*
500 + to perform probe-based failure detection for the
501 + associated physical IP interface. As a side effect,
502 + *DEPRECATED* will also be set on the logical interface.
503 + This operation is not permitted on an IPMP IP interface.
508 504
509 505
510 506 failover
511 507
512 - Mark the logical interface as a failover interface. An
513 - address assigned to such an interface will failover when
514 - the interface fails. Status display does not show
515 - NOFAILOVER as part of flags.
508 + Clear *NOFAILOVER* on the logical interface. This is
509 + the default. These logical interfaces are subject to
510 + migration when brought up (see IP MULTIPATHING GROUPS).
516 511
517 512
518 - group [ name |""]
513 + group [ name | "" ]
519 514
520 - Insert the logical interface in the multipathing group
521 - specified by name. To delete an interface from a group,
515 + When applied to a physical interface, it places the
516 + interface into the named group. If the group does not
517 + exist, it will be created, along with one or more IPMP
518 + IP interfaces (for IPv4, IPv6, or both). Any *UP*
519 + addresses that are not also marked *NOFAILOVER* are
520 + subject to migration to the IPMP IP interface (see IP
521 + MULTIPATHING GROUPS). Specifying a group name of *""*
522 + removes the physical IP interface from the group.
522 523
524 + When applied to a physical IPMP IP interface, it renames
525 + the IPMP group to have the new name. If the name
526 + already exists, or a name of *""* is specified, it
527 + fails. Renaming IPMP groups is discouraged. Instead,
528 + the IPMP IP interface should be given a meaningful name
529 + when it is created via the *ipmp* subcommand, which the
530 + system will also use as the IPMP group name.
523 531
524 532
525 -SunOS 5.11 Last change: 21 Jan 2007 8
526 -
527 -
528 -
529 -
530 -
531 -
532 -System Administration Commands ifconfig(1M)
533 -
534 -
535 -
536 - use a null string "". When invoked on the logical inter-
537 - face with id zero, the status display shows the group
538 - name.
539 -
540 -
541 533 index n
542 534
543 535 Change the interface index for the interface. The value
544 536 of n must be an interface index (if_index) that is not
545 537 used on another interface. if_index will be a non-zero
546 538 positive number that uniquely identifies the network
547 539 interface on the system.
548 540
549 541
542 + ipmp
543 +
544 + Create an IPMP IP interface with the specified name. An
545 + interface must be separately created for use by IPv4 and
546 + IPv6. The *address_family* parameter controls whether
547 + the command applies to IPv4 or IPv6 (IPv4 if
548 + unspecified). All IPMP IP interfaces have the *IPMP*
549 + flag set.
550 +
550 551 metric n
551 552
552 553 Set the routing metric of the interface to n; if no
553 554 value is specified, the default is 0. The routing metric
554 555 is used by the routing protocol. Higher metrics have the
555 556 effect of making a route less favorable. Metrics are
556 557 counted as addition hops to the destination network or
557 558 host.
558 559
559 560
560 561 modinsert mod_name@pos
561 562
562 563 Insert a module with name mod_name to the stream of the
563 564 device at position pos. The position is relative to the
564 565 stream head. Position 0 means directly under stream
565 566 head.
566 567
567 568 Based upon the example in the modlist option, use the
568 569 following command to insert a module with name ipqos
569 570 under the ip module and above the firewall module:
570 571
571 572 example% ifconfig eri0 modinsert ipqos@2
572 573
573 574
574 575 A subsequent listing of all the modules in the stream of
575 576 the device follows:
576 577
577 578 example% ifconfig eri0 modlist
578 579 0 arp
579 580 1 ip
580 581 2 ipqos
581 582 3 firewall
582 583 4 eri
583 584
584 585
585 586
586 587
587 588
588 589
589 590
590 591
591 592 SunOS 5.11 Last change: 21 Jan 2007 9
592 593
593 594
594 595
595 596
596 597
597 598
598 599 System Administration Commands ifconfig(1M)
599 600
600 601
601 602
602 603 modlist
603 604
604 605 List all the modules in the stream of the device.
605 606
606 607 The following example lists all the modules in the
607 608 stream of the device:
608 609
609 610 example% ifconfig eri0 modlist
610 611 0 arp
611 612 1 ip
612 613 2 firewall
613 614 4 eri
614 615
615 616
616 617
617 618
618 619 modremove mod_name@pos
619 620
620 621 Remove a module with name mod_name from the stream of
621 622 the device at position pos. The position is relative to
622 623 the stream head.
623 624
624 625 Based upon the example in the modinsert option, use the
625 626 following command to remove the firewall module from the
626 627 stream after inserting the ipqos module:
627 628
628 629 example% ifconfig eri0 modremove firewall@3
629 630
630 631
631 632 A subsequent listing of all the modules in the stream of
632 633 the device follows:
633 634
634 635 example% ifconfig eri0 modlist
635 636 0 arp
636 637 1 ip
637 638 2 ipqos
638 639 3 eri
639 640
640 641
641 642 Note that the core IP stack modules, for example, ip and
642 643 tun modules, cannot be removed.
643 644
644 645
645 646 mtu n
646 647
647 648 Set the maximum transmission unit of the interface to n.
648 649 For many types of networks, the mtu has an upper limit,
649 650 for example, 1500 for Ethernet. This option sets the
650 651 FIXEDMTU flag on the affected interface.
651 652
652 653
653 654
654 655
655 656
656 657
657 658 SunOS 5.11 Last change: 21 Jan 2007 10
658 659
659 660
660 661
661 662
662 663
663 664
664 665 System Administration Commands ifconfig(1M)
665 666
666 667
667 668
668 669 netmask mask
669 670
670 671 For IPv4 only. Specify how much of the address to
671 672 reserve for subdividing networks into subnetworks. The
672 673 mask includes the network part of the local address and
673 674 the subnet part, which is taken from the host field of
674 675 the address. The mask contains 1's for the bit positions
675 676 in the 32-bit address which are to be used for the net-
676 677 work and subnet parts, and 0's for the host part. The
677 678 mask should contain at least the standard network por-
678 679 tion, and the subnet field should be contiguous with the
679 680 network portion. The mask can be specified in one of
680 681 four ways:
681 682
682 683 1. with a single hexadecimal number with a leading
683 684 0x,
684 685
685 686 2. with a dot-notation address,
686 687
687 688 3. with a "+" (plus sign) address, or
688 689
689 690 4. with a pseudo host name/pseudo network name
690 691 found in the network database networks(4).
691 692 If a "+" (plus sign) is given for the netmask value, the
692 693 mask is looked up in the netmasks(4) database. This
693 694 lookup finds the longest matching netmask in the data-
694 695 base by starting with the interface's IPv4 address as
695 696 the key and iteratively masking off more and more low
696 697 order bits of the address. This iterative lookup ensures
697 698 that the netmasks(4) database can be used to specify the
698 699 netmasks when variable length subnetmasks are used
699 700 within a network number.
700 701
701 702 If a pseudo host name/pseudo network name is supplied as
702 703 the netmask value, netmask data may be located in the
703 704 hosts or networks database. Names are looked up by first
704 705 using gethostbyname(3NSL). If not found there, the names
705 706 are looked up in getnetbyname(3SOCKET). These interfaces
706 707 may in turn use nsswitch.conf(4) to determine what data
707 708 store(s) to use to fetch the actual value.
708 709
709 710 For both inet and inet6, the same information conveyed
710 711 by mask can be specified as a prefix_length attached to
711 712 the address parameter.
712 713
713 714
714 715 nud
715 716
716 717 Enables the neighbor unreachability detection mechanism
717 718 on a point-to-point physical interface.
718 719
719 720
720 721
721 722
722 723
723 724 SunOS 5.11 Last change: 21 Jan 2007 11
724 725
725 726
726 727
727 728
728 729
729 730
730 731 System Administration Commands ifconfig(1M)
731 732
|
↓ open down ↓ |
172 lines elided |
↑ open up ↑ |
732 733
733 734
734 735 -nud
735 736
736 737 Disables the neighbor unreachability detection mechanism
737 738 on a point-to-point physical interface.
738 739
739 740
740 741 plumb
741 742
742 - Open the device associated with the physical interface
743 - name and set up the streams needed for IP to use the
744 - device. When used with a logical interface name, this
745 - command is used to create a specific named logical
746 - interface. An interface must be separately plumbed for
747 - use by IPv4 and IPv6. The address_family parameter con-
748 - trols whether the ifconfig command applies to IPv4 or
749 - IPv6.
743 + For a physical IP interface, open the datalink
744 + associated with the physical interface name and set up
745 + the plumbing needed for IP to use the datalink. When
746 + used with a logical interface name, this command is used
747 + to create a specific named logical interface on an
748 + existing physical IP interface.
750 749
751 - Before an interface has been plumbed, the interface will
752 - not show up in the output of the ifconfig -a command.
750 + An interface must be separately plumbed for IPv4 and
751 + IPv6 according to the *address_family* parameter (IPv4
752 + if unspecified). Before an interface has been plumbed,
753 + it will not be shown by *ifconfig -a*.
753 754
755 + Note that IPMP IP interfaces are not tied to a specific
756 + datalink and are instead created with the *ipmp*
757 + subcommand.
754 758
755 759 private
756 760
757 761 Tells the in.routed routing daemon that a specified log-
758 762 ical interface should not be advertised.
759 763
760 764
761 765 -private
762 766
763 767 Specify unadvertised interfaces.
764 768
765 769
766 770 removeif address
767 771
768 772 Remove the logical interface on the physical interface
769 - specified that matches the address specified. When the
770 - interface is part of a multipathing group, the logical
771 - interface will be removed from the physical interface in
772 - the group that holds the address.
773 + specified that matches the address specified.
773 774
774 -
775 775 router
776 776
777 777 Enable IP forwarding on the interface. When enabled, the
778 - interface is marked ROUTER, and IP packets can be for-
779 - warded to and from the interface.
778 + interface is marked *ROUTER*, and IP packets can be for-
779 + warded to and from the interface. Enabling *ROUTER* on
780 + any IP interface in an IPMP group applies the flag to
781 + all IP interfaces in that IPMP group.
780 782
781 783
782 784 -router
783 785
784 - Disable IP forwarding on the interface. IP packets are
785 - not forwarded to and from the interface.
786 + Disable IP forwarding on the interface. IP packets are
787 + not forwarded to and from the interface. Disabling
788 + *ROUTER* on any IP interface in an IPMP group disables
789 + it on all IP interfaces in that IPMP group.
786 790
787 791
788 792
789 793 SunOS 5.11 Last change: 21 Jan 2007 12
790 794
791 795
792 796
793 797
794 798
795 799
796 800 System Administration Commands ifconfig(1M)
797 801
|
↓ open down ↓ |
2 lines elided |
↑ open up ↑ |
798 802
799 803
800 804 set
801 805
802 806 Set the address, prefix_length or both, for a logical
803 807 interface.
804 808
805 809
806 810 standby
807 811
808 - Marks the physical interface as a standby interface. If
809 - the interface is marked STANDBY and is part of the mul-
810 - tipathing group, the interface will not be selected to
811 - send out packets unless some other interface in the
812 - group has failed and the network access has been failed
813 - over to this standby interface.
812 + Mark the physical IP interface as a *STANDBY* interface.
813 + If an interface is marked *STANDBY* and is part of an
814 + IPMP group, the interface will not be used for data
815 + traffic unless another interface in the IPMP group
816 + becomes unusable. When a *STANDBY* interface is
817 + functional but not being used for data traffic, it will
818 + also be marked *INACTIVE*. This operation is not
819 + permitted on an IPMP IP interface.
814 820
815 - The status display shows "STANDBY, INACTIVE" indicating
816 - that that the interface is a standby and is also inac-
817 - tive. IFF_INACTIVE will be cleared when some other
818 - interface belonging to the same multipathing group fails
819 - over to this interface. Once a failback happens, the
820 - status display will return to INACTIVE.
821 821
822 -
823 822 -standby
824 823
825 - Turns off standby on this interface.
824 + Clear *STANDBY* on this interface. This is the default.
826 825
827 826
828 827 subnet
829 828
830 829 Set the subnet address for an interface.
831 830
832 831
833 832 tdst tunnel_dest_address
834 833
835 834 Set the destination address of a tunnel. The address
836 835 should not be the same as the dest_address of the tun-
837 836 nel, because no packets leave the system over such a
838 837 tunnel.
839 838
840 839
841 840 thoplimit n
842 841
843 842 Set the hop limit for a tunnel interface. The hop limit
844 843 value is used as the TTL in the IPv4 header for the
845 844 IPv6-in-IPv4 and IPv4-in-IPv4 tunnels. For IPv6-in-IPv6
846 845 and IPv4-in-IPv6 tunnels, the hop limit value is used as
847 846 the hop limit in the IPv6 header.
848 847
849 848
850 849 token address/prefix_length
851 850
852 851
853 852
854 853
855 854 SunOS 5.11 Last change: 21 Jan 2007 13
856 855
857 856
858 857
859 858
860 859
861 860
862 861 System Administration Commands ifconfig(1M)
863 862
864 863
865 864
866 865 Set the IPv6 token of an interface to be used for
867 866 address autoconfiguration.
868 867
869 868 example% ifconfig eri0 inet6 token ::1/64
870 869
871 870
872 871
873 872
874 873 trailers
875 874
876 875 This flag previously caused a nonstandard encapsulation
877 876 of IPv4 packets on certain link levels. Drivers supplied
878 877 with this release no longer use this flag. It is pro-
879 878 vided for compatibility, but is ignored.
880 879
881 880
882 881 -trailers
883 882
884 883 Disable the use of a "trailer" link level encapsulation.
885 884
886 885
|
↓ open down ↓ |
51 lines elided |
↑ open up ↑ |
887 886 tsrc tunnel_src_address
888 887
889 888 Set the source address of a tunnel. This is the source
890 889 address on an outer encapsulating IP header. It must be
891 890 an address of another interface already configured using
892 891 ifconfig.
893 892
894 893
895 894 unplumb
896 895
897 - Close the device associated with this physical interface
898 - name and any streams that ifconfig set up for IP to use
899 - the device. When used with a logical interface name, the
900 - logical interface is removed from the system. After this
901 - command is executed, the device name will no longer
902 - appear in the output of ifconfig -a.
896 + For a physical or IPMP interface, remove all associated
897 + logical IP interfaces and tear down any plumbing needed
898 + for IP to use the interface. For an IPMP IP interface,
899 + this command will fail if the group is not empty. For a
900 + logical interface, the logical interface is removed.
903 901
902 + An interface must be separately unplumbed for IPv4 and
903 + IPv6 according to the *address_family* parameter (IPv4
904 + if unspecified). Upon success, the interface name will
905 + no longer appear in the output of *ifconfig -a*.
904 906
907 +
905 908 up
906 909
907 - Mark a logical interface "up". This happens automati-
908 - cally when assigning the first address to a logical
909 - interface. The up option enables an interface after an
910 - ifconfig down, which reinitializes the hardware.
910 + Mark a logical interface *UP*. As a result, the IP
911 + module will accept packets destined to the associated
912 + address (unless the address is zero), along with any
913 + associated multicast and broadcast IP addresses.
914 + Similarly, the IP module will allow packets to be sent
915 + with the associated address as a source address.
911 916
912 917
913 918 usesrc [ name | none ]
914 919
915 920 Specify a physical interface to be used for source
916 921 address selection. If the keyword none is used, then any
917 922 previous selection is cleared.
918 923
919 924
920 925
921 926 SunOS 5.11 Last change: 21 Jan 2007 14
922 927
923 928
924 929
925 930
926 931
927 932
928 933 System Administration Commands ifconfig(1M)
929 934
930 935
931 936
932 937 When an application does not choose a non-zero source
933 938 address using bind(3SOCKET), the system will select an
934 939 appropriate source address based on the outbound inter-
935 940 face and the address selection rules (see
936 941 ipaddrsel(1M)).
937 942
938 943 When usesrc is specified and the specified interface is
939 944 selected in the forwarding table for output, the system
940 945 looks first to the specified physical interface and its
941 946 associated logical interfaces when selecting a source
942 947 address. If no usable address is listed in the forward-
943 948 ing table, the ordinary selection rules apply. For exam-
944 949 ple, if you enter:
945 950
946 951 # ifconfig eri0 usesrc vni0
947 952
948 953
949 954 ...and vni0 has address 10.0.0.1 assigned to it, the
950 955 system will prefer 10.0.0.1 as the source address for
951 956 any packets originated by local connections that are
952 957 sent through eri0. Further examples are provided in the
953 958 EXAMPLES section.
954 959
955 960 While you can specify any physical interface (or even
956 961 loopback), be aware that you can also specify the vir-
957 962 tual IP interface (see vni(7D)). The virtual IP inter-
958 963 face is not associated with any physical hardware and is
959 964 thus immune to hardware failures. You can specify any
960 965 number of physical interfaces to use the source address
961 966 hosted on a single virtual interface. This simplifies
962 967 the configuration of routing-based multipathing. If one
963 968 of the physical interfaces were to fail, communication
964 969 would continue through one of the remaining, functioning
965 970 physical interfaces. This scenario assumes that the
|
↓ open down ↓ |
45 lines elided |
↑ open up ↑ |
966 971 reachability of the address hosted on the virtual inter-
967 972 face is advertised in some manner, for example, through
968 973 a routing protocol.
969 974
970 975 Because the ifconfig preferred option is applied to all
971 976 interfaces, it is coarser-grained than the usesrc
972 977 option. It will be overridden by usesrc and setsrc
973 978 (route subcommand), in that order.
974 979
975 980 The use of the usesrc option is mutually exclusive of
976 - the IP multipathing ifconfig options, group and standby.
977 - That is, if an interface is already part of a IP mul-
978 - tipathing group or specified as a standby interface,
979 - then it cannot be specified with a usesrc option, and
980 - vice-versa. For more details on IP multipathing, see
981 - in.mpathd(1M) and the .
981 + the IPMP *group* and *standby* subcommands. That is, if
982 + an interface is already part of a IPMP group or
983 + specified as a *STANDBY* interface, then it cannot be
984 + specified with a usesrc option, and vice-versa.
982 985
983 986
984 987
985 -
986 -
987 988 SunOS 5.11 Last change: 21 Jan 2007 15
988 989
989 990
990 991
991 992
992 993
993 994
994 995 System Administration Commands ifconfig(1M)
995 996
996 997
997 998
998 999 xmit
999 1000
1000 1001 Enable a logical interface to transmit packets. This is
1001 1002 the default behavior when the logical interface is up.
1002 1003
1003 1004
1004 1005 -xmit
1005 1006
1006 1007 Disable transmission of packets on an interface. The
1007 1008 interface will continue to receive packets.
1008 1009
1009 1010
1010 1011 zone zonename
1011 1012
1012 1013 Place the logical interface in zone zonename. The named
1013 1014 zone must be active in the kernel in the ready or run-
1014 1015 ning state. The interface is unplumbed when the zone is
1015 1016 halted or rebooted. The zone must be configure to be an
1016 1017 shared-IP zone. zonecfg(1M) is used to assign network
1017 1018 interface names to exclusive-IP zones.
1018 1019
1019 1020
1020 1021 -zone
1021 1022
1022 1023 Place IP interface in the global zone. This is the
1023 1024 default.
1024 1025
1025 1026
1026 1027 OPERANDS
1027 1028 The interface operand, as well as address parameters that
1028 1029 affect it, are described below.
1029 1030
1030 1031 interface
1031 1032
1032 1033 A string of one of the following forms:
1033 1034
1034 1035 o name physical-unit, for example, eri0 or ce1
1035 1036
1036 1037 o name physical-unit:logical-unit, for example,
1037 1038 eri0:1
1038 1039
1039 1040 o ip.tunN or ip6.tunN, for tunnels
1040 1041 If the interface name starts with a dash (-), it is
1041 1042 interpreted as a set of options which specify a set of
1042 1043 interfaces. In such a case, -a must be part of the
1043 1044 options and any of the additional options below can be
1044 1045 added in any order. If one of these interface names is
1045 1046 given, the commands following it are applied to all of
1046 1047 the interfaces that match.
1047 1048
1048 1049 -a
1049 1050
1050 1051
1051 1052
1052 1053
1053 1054 SunOS 5.11 Last change: 21 Jan 2007 16
1054 1055
1055 1056
1056 1057
1057 1058
1058 1059
1059 1060
1060 1061 System Administration Commands ifconfig(1M)
1061 1062
1062 1063
1063 1064
1064 1065 Apply the command to all interfaces of the specified
1065 1066 address family. If no address family is supplied,
1066 1067 either on the command line or by means of
1067 1068 /etc/default/inet_type, then all address families
1068 1069 will be selected.
1069 1070
1070 1071
1071 1072 -d
1072 1073
1073 1074 Apply the commands to all "down" interfaces in the
1074 1075 system.
1075 1076
1076 1077
1077 1078 -D
1078 1079
1079 1080 Apply the commands to all interfaces not under DHCP
1080 1081 (Dynamic Host Configuration Protocol) control.
1081 1082
1082 1083
1083 1084 -u
1084 1085
1085 1086 Apply the commands to all "up" interfaces in the
1086 1087 system.
1087 1088
1088 1089
1089 1090 -Z
1090 1091
1091 1092 Apply the commands to all interfaces in the user's
1092 1093 zone.
1093 1094
1094 1095
1095 1096 -4
1096 1097
1097 1098 Apply the commands to all IPv4 interfaces.
1098 1099
1099 1100
1100 1101 -6
1101 1102
1102 1103 Apply the commands to all IPv6 interfaces.
1103 1104
1104 1105
1105 1106
1106 1107 address_family
1107 1108
1108 1109 The address family is specified by the address_family
1109 1110 parameter. The ifconfig command currently supports the
1110 1111 following families: inet and inet6. If no address family
1111 1112 is specified, the default is inet.
1112 1113
1113 1114 ifconfig honors the DEFAULT_IP setting in the
1114 1115 /etc/default/inet_type file when it displays interface
1115 1116 information . If DEFAULT_IP is set to IP_VERSION4, then
1116 1117
1117 1118
1118 1119
1119 1120 SunOS 5.11 Last change: 21 Jan 2007 17
1120 1121
1121 1122
1122 1123
1123 1124
1124 1125
1125 1126
1126 1127 System Administration Commands ifconfig(1M)
1127 1128
1128 1129
1129 1130
1130 1131 ifconfig will omit information that relates to IPv6
1131 1132 interfaces. However, when you explicitly specify an
1132 1133 address family (inet or inet6) on the ifconfig command
1133 1134 line, the command line overrides the DEFAULT_IP set-
1134 1135 tings.
1135 1136
1136 1137
1137 1138 address
1138 1139
1139 1140 For the IPv4 family (inet), the address is either a host
1140 1141 name present in the host name data base (see hosts(4))
1141 1142 or in the Network Information Service (NIS) map hosts,
1142 1143 or an IPv4 address expressed in the Internet standard
1143 1144 "dot notation".
1144 1145
1145 1146 For the IPv6 family (inet6), the address is either a
1146 1147 host name present in the host name data base (see
1147 1148 hosts(4)) or in the Network Information Service (NIS)
1148 1149 map ipnode, or an IPv6 address expressed in the Internet
1149 1150 standard colon-separated hexadecimal format represented
1150 1151 as x:x:x:x:x:x:x:x where x is a hexadecimal number
1151 1152 between 0 and FFFF.
1152 1153
1153 1154
1154 1155 prefix_length
1155 1156
1156 1157 For the IPv4 and IPv6 families (inet and inet6), the
1157 1158 prefix_length is a number between 0 and the number of
1158 1159 bits in the address. For inet, the number of bits in the
1159 1160 address is 32; for inet6, the number of bits in the
1160 1161 address is 128. The prefix_length denotes the number of
1161 1162 leading set bits in the netmask.
1162 1163
1163 1164
1164 1165 dest_address
1165 1166
1166 1167 If the dest_address parameter is supplied in addition to
1167 1168 the address parameter, it specifies the address of the
1168 1169 correspondent on the other end of a point-to-point link.
1169 1170
1170 1171
1171 1172 tunnel_dest_address
1172 1173
1173 1174 An address that is or will be reachable through an
1174 1175 interface other than the tunnel being configured. This
1175 1176 tells the tunnel where to send the tunneled packets.
1176 1177 This address must not be the same as the interface des-
1177 1178 tination address being configured.
1178 1179
1179 1180
1180 1181 tunnel_src_address
1181 1182
1182 1183
1183 1184
1184 1185
1185 1186 SunOS 5.11 Last change: 21 Jan 2007 18
1186 1187
1187 1188
1188 1189
1189 1190
1190 1191
1191 1192
1192 1193 System Administration Commands ifconfig(1M)
1193 1194
1194 1195
1195 1196
1196 1197 An address that is attached to an already configured
1197 1198 interface that has been configured "up" with ifconfig.
1198 1199
1199 1200
1200 1201 INTERFACE FLAGS
1201 1202 The ifconfig command supports the following interface flags.
1202 1203 The term "address" in this context refers to a logical
1203 1204 interface, for example, eri0:0, while "interface " refers to
1204 1205 the physical interface, for example, eri0.
1205 1206
1206 1207 ADDRCONF
1207 1208
1208 1209 The address is from stateless addrconf. The stateless
1209 1210 mechanism allows a host to generate its own address
1210 1211 using a combination of information advertised by routers
1211 1212 and locally available information. Routers advertise
1212 1213 prefixes that identify the subnet associated with the
1213 1214 link, while the host generates an "interface identifier"
1214 1215 that uniquely identifies an interface in a subnet. In
1215 1216 the absence of information from routers, a host can gen-
1216 1217 erate link-local addresses. This flag is specific to
1217 1218 IPv6.
1218 1219
1219 1220
1220 1221 ANYCAST
1221 1222
1222 1223 Indicates an anycast address. An anycast address identi-
1223 1224 fies the nearest member of a group of systems that pro-
1224 1225 vides a particular type of service. An anycast address
1225 1226 is assigned to a group of systems. Packets are delivered
1226 1227 to the nearest group member identified by the anycast
1227 1228 address instead of being delivered to all members of the
1228 1229 group.
1229 1230
1230 1231
|
↓ open down ↓ |
234 lines elided |
↑ open up ↑ |
1231 1232 BROADCAST
1232 1233
1233 1234 This broadcast address is valid. This flag and POINTTO-
1234 1235 POINT are mutually exclusive
1235 1236
1236 1237
1237 1238 CoS
1238 1239
1239 1240 This interface supports some form of Class of Service
1240 1241 (CoS) marking. An example is the 802.1D user priority
1241 - marking supported on VLAN interfaces.
1242 + marking supported on VLAN interfaces. For IPMP IP
1243 + interfaces, this will only be set if all interfaces in
1244 + the group have CoS set.
1242 1245
1243 1246
1244 1247 DEPRECATED
1245 1248
1246 1249 This address is deprecated. This address will not be
1247 1250 used as a source address for outbound packets unless
1248 -
1249 -
1250 -
1251 -SunOS 5.11 Last change: 21 Jan 2007 19
1252 -
1253 -
1254 -
1255 -
1256 -
1257 -
1258 -System Administration Commands ifconfig(1M)
1259 -
1260 -
1261 -
1262 1251 there are no other addresses on this interface or an
1263 - application has explicitly bound to this address. An
1264 - IPv6 deprecated address will eventually be deleted when
1265 - not used, whereas an IPv4 deprecated address is often
1266 - used with IP network multipathing IPv4 test addresses,
1267 - which are determined by the setting of the NOFAILOVER
1268 - flag. Further, the DEPRECATED flag is part of the stan-
1269 - dard mechanism for renumbering in IPv6.
1252 + application has explicitly bound to this address. An
1253 + IPv6 deprecated address is part of the standard
1254 + mechanism for renumbering in IPv6 and will eventually be
1255 + deleted when not used. For both IPv4 and IPv6,
1256 + *DEPRECATED* is also set on all *NOFAILOVER* addresses,
1257 + though this may change in a future release.
1270 1258
1259 + DHCPRUNNING
1271 1260
1272 - DHCP
1261 + The logical interface is managed by *dhcpagent(1M)*.
1273 1262
1274 - DHCP is used to manage this address.
1275 1263
1276 -
1277 1264 DUPLICATE
1278 1265
1279 1266 The logical interface has been disabled because the IP
1280 1267 address configured on the interface is a duplicate. Some
1281 1268 other node on the network is using this address. If the
1282 1269 address was configured by DHCP or is temporary, the sys-
1283 1270 tem will choose another automatically, if possible. Oth-
1284 1271 erwise, the system will attempt to recover this address
1285 1272 periodically and the interface will recover when the
1286 1273 conflict has been removed from the network. Changing the
1287 1274 address or netmask, or setting the logical interface to
1288 1275 up will restart duplicate detection. Setting the inter-
1289 1276 face to down terminates recovery and removes the DUPLI-
1290 1277 CATE flag.
1291 1278
1292 1279
1293 1280 FAILED
1294 1281
1295 - The interface has failed. New addresses cannot be
1296 - created on this interface. If this interface is part of
1297 - an IP network multipathing group, a failover will occur
1298 - to another interface in the group, if possible
1282 + The *in.mpathd* daemon has determined that the interface
1283 + has failed. *FAILED* interfaces will not be used to
1284 + send or receive IP data traffic. If this is set on a
1285 + physical IP interface in an IPMP group, IP data traffic
1286 + will continue to flow over other usable IP interfaces in
1287 + the IPMP group. If this is set on an IPMP IP interface,
1288 + the entire group has failed and no data traffic can be
1289 + sent or received over any interfaces in that group.
1299 1290
1300 1291
1301 1292 FIXEDMTU
1302 1293
1303 1294 The MTU has been set using the -mtu option. This flag is
1304 1295 read-only. Interfaces that have this flag set have a
1305 1296 fixed MTU value that is unaffected by dynamic MTU
1306 1297 changes that can occur when drivers notify IP of link
1307 1298 MTU changes.
1308 1299
1309 1300
1310 1301 INACTIVE
1311 1302
1312 - Indicates that the interface is not currently being used
1313 - for regular traffic by the system. New addresses cannot
1303 + The physical interface is functioning but is not used to
1304 + send or receive data traffic according to administrative
1305 + policy. This flag is initially set by the *standby*
1306 + subcommand and is subsequently controlled by
1307 + *in.mpathd*. It also set when *FAILBACK=no* mode is
1308 + enabled (see *in.mpathd(1M)*) to indicate that the IP
1309 + interface has repaired but is not being used.
1314 1310
1315 1311
1312 + IPMP
1316 1313
1317 -SunOS 5.11 Last change: 21 Jan 2007 20
1314 + Indicates that this is an IPMP IP interface.
1318 1315
1319 1316
1320 -
1321 -
1322 -
1323 -
1324 -System Administration Commands ifconfig(1M)
1325 -
1326 -
1327 -
1328 - be created on this interface. The flag is set automati-
1329 - cally on standby interfaces. It can also be set when the
1330 - system detects that a failed interface has been repaired
1331 - and FAILBACK=no is configured in /etc/default/mpathd.
1332 - The flag is cleared when the interface fails or when a
1333 - failover to that interface occurs.
1334 -
1335 -
1336 1317 LOOPBACK
1337 1318
1338 1319 Indicates that this is the loopback interface.
1339 1320
1340 1321
1341 - MIP
1342 -
1343 - Indicates that mobile IP controls this interface.
1344 -
1345 -
1346 1322 MULTI_BCAST
1347 1323
1348 1324 Indicates that the broadcast address is used for multi-
1349 1325 cast on this interface.
1350 1326
1351 1327
1352 1328 MULTICAST
1353 1329
1354 1330 The interface supports multicast. IP assumes that any
1355 1331 interface that supports hardware broadcast, or that is a
1356 1332 point-to-point link, will support multicast.
1357 1333
1358 1334
|
↓ open down ↓ |
3 lines elided |
↑ open up ↑ |
1359 1335 NOARP
1360 1336
1361 1337 There is no address resolution protocol (ARP) for this
1362 1338 interface that corresponds to all interfaces for a dev-
1363 1339 ice without a broadcast address. This flag is specific
1364 1340 to IPv4.
1365 1341
1366 1342
1367 1343 NOFAILOVER
1368 1344
1369 - This address will not failover if the interface fails.
1370 - IP network multipathing test addresses must be marked
1371 - nofailover.
1345 + The address associated with this logical interface is
1346 + available to *in.mpathd* for probe-based failure
1347 + detection of the associated physical IP interface.
1372 1348
1373 1349
1374 1350 NOLOCAL
1375 1351
1376 1352 The interface has no address , just an on-link subnet.
1377 1353
1378 1354
1379 1355
1380 1356
1381 1357
1382 1358
1383 1359 SunOS 5.11 Last change: 21 Jan 2007 21
1384 1360
1385 1361
1386 1362
1387 1363
1388 1364
1389 1365
1390 1366 System Administration Commands ifconfig(1M)
1391 1367
1392 1368
1393 1369
1394 1370 NONUD
1395 1371
1396 1372 NUD is disabled on this interface. NUD (neighbor
1397 1373 unreachability detection) is used by a node to track the
1398 1374 reachability state of its neighbors, to which the node
1399 1375 actively sends packets, and to perform any recovery if a
1400 1376 neighbor is detected to be unreachable. This flag is
1401 1377 specific to IPv6.
1402 1378
1403 1379
1404 1380 NORTEXCH
1405 1381
1406 1382 The interface does not exchange routing information. For
1407 1383 RIP-2, routing packets are not sent over this interface.
1408 1384 Additionally, messages that appear to come over this
1409 1385 interface receive no response. The subnet or address of
1410 1386 this interface is not included in advertisements over
1411 1387 other interfaces to other routers.
|
↓ open down ↓ |
30 lines elided |
↑ open up ↑ |
1412 1388
1413 1389
1414 1390 NOXMIT
1415 1391
1416 1392 Indicates that the address does not transmit packets.
1417 1393 RIP-2 also does not advertise this address.
1418 1394
1419 1395
1420 1396 OFFLINE
1421 1397
1422 - Indicates that the interface has been offlined. New
1423 - addresses cannot be created on this interface. Inter-
1424 - faces in an IP network multipathing group are offlined
1425 - prior to removal and replacement using dynamic reconfi-
1426 - guration.
1398 + The interface is offline and thus cannot send or receive
1399 + IP data traffic. This is only set on IP interfaces in
1400 + an IPMP group. See *if_mpadm(1M)* and *cfgadm(1M)*.
1427 1401
1428 1402
1429 1403 POINTOPOINT
1430 1404
1431 1405 Indicates that the address is a point-to-point link.
1432 1406 This flag and BROADCAST are mutually exclusive
1433 1407
1434 1408
1435 1409 PREFERRED
1436 1410
1437 1411 This address is a preferred IPv6 source address. This
1438 1412 address will be used as a source address for IPv6 com-
1439 1413 munication with all IPv6 destinations, unless another
1440 1414 address on the system is of more appropriate scope. The
1441 1415 DEPRECATED flag takes precedence over the PREFERRED
1442 1416 flag.
1443 1417
1444 1418
1445 1419
1446 1420
1447 1421
1448 1422
1449 1423 SunOS 5.11 Last change: 21 Jan 2007 22
1450 1424
1451 1425
1452 1426
1453 1427
1454 1428
1455 1429
1456 1430 System Administration Commands ifconfig(1M)
1457 1431
1458 1432
1459 1433
1460 1434 PRIVATE
1461 1435
1462 1436 Indicates that this address is not advertised. For RIP-
1463 1437 2, this interface is used to send advertisements. How-
1464 1438 ever, neither the subnet nor this address are included
1465 1439 in advertisements to other routers.
|
↓ open down ↓ |
29 lines elided |
↑ open up ↑ |
1466 1440
1467 1441
1468 1442 ROUTER
1469 1443
1470 1444 Indicates that IP packets can be forwarded to and from
1471 1445 the interface.
1472 1446
1473 1447
1474 1448 RUNNING
1475 1449
1476 - Indicates that the required resources for an interface
1450 + Indicates that the required resources for an i nterface
1477 1451 are allocated. For some interfaces this also indicates
1478 - that the link is up.
1452 + that the link is up. For IPMP IP interfaces, *RUNNING*
1453 + is set as long as one IP interface in the group is
1454 + active.
1479 1455
1480 1456
1481 1457 STANDBY
1482 1458
1483 - Indicates that this is a standby interface to be used on
1484 - failures. Only interfaces in an IP network multipathing
1485 - group should be designated as standby interfaces. If
1486 - this interface is part of a IP network multipathing
1487 - group, the interface will not be selected to send out
1488 - packets unless some other interface in the group fails
1489 - over to it.
1459 + Indicates that this physical interface will not be used
1460 + for data traffic unless another interface in the IPMP
1461 + group becomes unusable. The *INACTIVE* and *FAILED*
1462 + flags indicate whether it is actively being used.
1490 1463
1491 1464
1492 1465 TEMPORARY
1493 1466
1494 1467 Indicates that this is a temporary IPv6 address as
1495 1468 defined in RFC 3041.
1496 1469
1497 1470
1498 1471 UNNUMBERED
1499 1472
1500 1473 This flag is set when the local IP address on the link
1501 1474 matches the local address of some other link in the sys-
1502 1475 tem
1503 1476
1504 1477
1505 1478 UP
1506 1479
1507 - Indicates that the interface is up, that is, all the
1508 - routing entries and the like for this interface have
1509 - been set up.
1480 + Indicates that the logical interface (and the associated
1481 + physical interface) is up. The IP module will accept
1482 + packets destined to UP addresses (unless the address is
1483 + zero), along with any associated multicast and broadcast
1484 + IP addresses. Similarly, the IP module will allow
1485 + packets to be sent with an UP address as a source
1486 + address.
1510 1487
1511 1488
1512 -
1513 -
1514 -
1515 1489 SunOS 5.11 Last change: 21 Jan 2007 23
1516 1490
1517 1491
1518 1492
1519 1493
1520 1494
1521 1495
1522 1496 System Administration Commands ifconfig(1M)
1523 1497
1524 1498
1525 1499
1526 1500 VIRTUAL
1527 1501
1528 1502 Indicates that the physical interface has no underlying
1529 1503 hardware. It is not possible to transmit or receive
1530 1504 packets through a virtual interface. These interfaces
1531 1505 are useful for configuring local addresses that can be
1532 - used on multiple interfaces. (See also the -usesrc
1506 + used on multiple interfaces. (See also the *usesrc*
1533 1507 option.)
1534 1508
1535 1509
1536 1510 XRESOLV
1537 1511
1538 1512 Indicates that the interface uses an IPv6 external
1539 1513 resolver.
1540 1514
1541 1515
1542 1516 LOGICAL INTERFACES
1543 1517 Solaris TCP/IP allows multiple logical interfaces to be
1544 1518 associated with a physical network interface. This allows a
1545 1519 single machine to be assigned multiple IP addresses, even
1546 1520 though it may have only one network interface. Physical net-
1547 1521 work interfaces have names of the form driver-name
1548 1522 physical-unit-number, while logical interfaces have names of
1549 1523 the form driver-name physical-unit-number:logical-unit-
1550 1524 number. A physical interface is configured into the system
1551 1525 using the plumb command. For example:
1552 1526
1553 1527 example% ifconfig eri0 plumb
1554 1528
1555 1529
1556 1530
1557 1531
1558 1532 Once a physical interface has been "plumbed", logical inter-
1559 1533 faces associated with the physical interface can be config-
1560 1534 ured by separate -plumb or -addif options to the ifconfig
1561 1535 command.
1562 1536
1563 1537 example% ifconfig eri0:1 plumb
1564 1538
1565 1539
1566 1540
1567 1541
1568 1542 allocates a specific logical interface associated with the
1569 1543 physical interface eri0. The command
1570 1544
1571 1545 example% ifconfig eri0 addif 192.168.200.1/24 up
1572 1546
1573 1547
1574 1548
1575 1549
1576 1550 allocates the next available logical unit number on the eri0
1577 1551 physical interface and assigns an address and prefix_length.
1578 1552
1579 1553
1580 1554
1581 1555 SunOS 5.11 Last change: 21 Jan 2007 24
1582 1556
1583 1557
1584 1558
1585 1559
1586 1560
1587 1561
1588 1562 System Administration Commands ifconfig(1M)
1589 1563
1590 1564
1591 1565
1592 1566 A logical interface can be configured with parameters (
|
↓ open down ↓ |
50 lines elided |
↑ open up ↑ |
1593 1567 address,prefix_length, and so on) different from the physi-
1594 1568 cal interface with which it is associated. Logical inter-
1595 1569 faces that are associated with the same physical interface
1596 1570 can be given different parameters as well. Each logical
1597 1571 interface must be associated with an existing and "up" phy-
1598 1572 sical interface. So, for example, the logical interface
1599 1573 eri0:1 can only be configured after the physical interface
1600 1574 eri0 has been plumbed.
1601 1575
1602 1576
1603 - To delete a logical interface, use the -unplumb or -removeif
1604 - options. For example,
1577 + To delete a logical interface, use the *unplumb* or
1578 + *removeif* options. For example,
1605 1579
1606 1580 example% ifconfig eri0:1 down unplumb
1607 1581
1582 + will delete the logical interface *eri0:1*.
1608 1583
1584 +IP MULTIPATHING GROUPS
1609 1585
1586 + Physical interfaces that share the same IP broadcast domain
1587 + _must_ be collected into a single IP Multipathing (IPMP)
1588 + group using the *group* subcommand. Each IPMP group has an
1589 + associated IPMP IP interface, which can either be explicitly
1590 + created (the preferred method) by using the *ipmp*
1591 + subcommand or implicitly created by *ifconfig* in response
1592 + to placing an IP interface into a new IPMP group.
1593 + Implicitly-created IPMP interfaces will be named ipmp_N_
1594 + where _N_ is the lowest integer that doesn't conflict with
1595 + an existing IP interface name or IPMP group name.
1610 1596
1611 - will delete the logical interface eri0:1.
1597 + Each IPMP IP interface is created with a matching IPMP group
1598 + name, though it can be changed using the *group* subcommand.
1599 + Each IPMP IP interface hosts a set of highly-available IP
1600 + addresses. These addresses will remain reachable so long as
1601 + at least one interface in the group is active, where
1602 + "active" is defined as having at least one UP address and
1603 + having *INACTIVE*, *FAILED*, and *OFFLINE* clear. IP
1604 + addresses hosted on the IPMP IP interface may either be
1605 + configured statically or configured through DHCP via the
1606 + *dhcp* subcommand.
1612 1607
1613 -MULTIPATHING GROUPS
1614 - Physical interfaces that share the same IP broadcast domain
1615 - can be collected into a multipathing group using the group
1616 - keyword. Interfaces assigned to the same multipathing group
1617 - are treated as equivalent and outgoing traffic is spread
1618 - across the interfaces on a per-IP-destination basis. In
1619 - addition, individual interfaces in a multipathing group are
1620 - monitored for failures; the addresses associated with failed
1621 - interfaces are automatically transferred to other function-
1622 - ing interfaces within the group.
1608 + Interfaces assigned to the same IPMP group are treated as
1609 + equivalent and monitored for failure by *in.mpathd*.
1610 + Provided that active interfaces in the group remain, IP
1611 + interface failures (and any subsequent repairs) are handled
1612 + transparently to sockets-based applications. IPMP is also
1613 + integrated with the Dynamic Reconfiguration framework (see
1614 + *cfgadm(1M)*), which enables network adapters to be replaced
1615 + transparently to sockets-based applications.
1616 +
1617 + The IP module automatically load-spreads all outbound
1618 + traffic across all active interfaces in an IPMP group.
1619 + Similarly, all *UP* addresses hosted on the IPMP IP
1620 + interface and will be distributed across the active
1621 + interfaces to promote inbound load-spreading. The
1622 + *ipmpstat(1M)* utility allows many aspects of the IPMP
1623 + subsystem to be observed, including the current binding of
1624 + IP data addresses to IP interfaces.
1623 1625
1626 + When an interface is placed into an IPMP group, any *UP*
1627 + logical interfaces are "migrated" to the IPMP IP interface
1628 + for use by the group, unless:
1624 1629
1625 - For more details on IP multipathing, see in.mpathd(1M) and
1626 - the . See netstat(1M) for per-IP-destination information.
1630 + * The logical interface is marked *NOFAILOVER*
1631 + * The logical interface hosts an IPv6 link-local address.
1632 + * The logical interface hosts an IPv4 0.0.0.0 address.
1627 1633
1634 + Likewise, once an interface is in a group, if changes are
1635 + made to a logical interface such that it is *UP* and not
1636 + exempted by one of the conditions above, it will also
1637 + migrate to the associated IPMP IP interface. Logical
1638 + interfaces never migrate back, even if the physical
1639 + interface that contributed the address is removed from the
1640 + group.
1641 +
1642 + Each interface placed into an IPMP group may be optionally
1643 + configured with a "test" address that *in.mpathd* will use
1644 + for probe-based failure detection; see *in.mpathd(1M)*.
1645 + These addresses must be marked *NOFAILOVER* (using the
1646 + *-failover* subcommand) prior to being marked *UP*. Test
1647 + addresses may also be acquired through DHCP via the *dhcp*
1648 + subcommand.
1649 +
1650 + For more background on IPMP, please see the "IPMP
1651 + Administrative Overview" and "IPMP Configuration Tasks"
1652 + chapters of the administrator documentation.
1653 +
1654 +
1628 1655 CONFIGURING IPV6 INTERFACES
1629 1656 When an IPv6 physical interface is plumbed and configured
1630 1657 "up" with ifconfig, it is automatically assigned an IPv6
1631 1658 link-local address for which the last 64 bits are calculated
1632 1659 from the MAC address of the interface.
1633 1660
1634 1661 example% ifconfig eri0 inet6 plumb up
1635 1662
1636 1663
1637 1664
1638 1665
1639 1666 The following example shows that the link-local address has
1640 1667 a prefix of fe80::/10.
1641 1668
1642 1669 example% ifconfig eri0 inet6
1643 1670 ce0: flags=2000841<UP,RUNNING,MULTICAST,IPv6>
1644 1671
1645 1672
1646 1673
1647 1674 SunOS 5.11 Last change: 21 Jan 2007 25
1648 1675
1649 1676
1650 1677
1651 1678
1652 1679
1653 1680
1654 1681 System Administration Commands ifconfig(1M)
1655 1682
1656 1683
1657 1684
1658 1685 mtu 1500 index 2
1659 1686 inet6 fe80::a00:20ff:fe8e:f3ad/10
1660 1687
1661 1688
1662 1689
1663 1690
1664 1691 Link-local addresses are only used for communication on the
1665 1692 local subnet and are not visible to other subnets.
1666 1693
1667 1694
1668 1695 If an advertising IPv6 router exists on the link advertising
1669 1696 prefixes, then the newly plumbed IPv6 interface will auto-
1670 1697 configure logical interface(s) depending on the prefix
1671 1698 advertisements. For example, for the prefix advertisement
1672 1699 2001:0db8:3c4d:0:55::/64, the autoconfigured interface will
1673 1700 look like:
1674 1701
1675 1702 eri0:2: flags=2080841<UP,RUNNING,MULTICAST,ADDRCONF,IPv6>
1676 1703 mtu 1500 index 2
1677 1704 inet6 2001:0db8:3c4d:55:a00:20ff:fe8e:f3ad/64
1678 1705
1679 1706
1680 1707
1681 1708
1682 1709 Even if there are no prefix advertisements on the link, you
1683 1710 can still assign global addresses manually, for example:
1684 1711
1685 1712 example% ifconfig eri0 inet6 addif \
1686 1713 2001:0db8:3c4d:55:a00:20ff:fe8e:f3ad/64 up
1687 1714
1688 1715
1689 1716
1690 1717
1691 1718 To configure boot-time defaults for the interface eri0,
1692 1719 place the following entry in the /etc/hostname6.eri0 file:
1693 1720
1694 1721 addif 2001:0db8:3c4d:55:a00:20ff:fe8e:f3ad/64 up
1695 1722
1696 1723
1697 1724 Configuring IPv6/IPv4 tunnels
1698 1725 An IPv6 over IPv4 tunnel interface can send and receive IPv6
1699 1726 packets encapsulated in an IPv4 packet. Create tunnels at
1700 1727 both ends pointing to each other. IPv6 over IPv4 tunnels
1701 1728 require the tunnel source and tunnel destination IPv4 and
1702 1729 IPv6 addresses. Solaris 8 supports both automatic and con-
1703 1730 figured tunnels. For automatic tunnels, an IPv4-compatible
1704 1731 IPv6 address is used. The following demonstrates auto-tunnel
1705 1732 configuration:
1706 1733
1707 1734 example% ifconfig ip.atun0 inet6 plumb
1708 1735 example% ifconfig ip.atun0 inet6 tsrc IPv4-address \
1709 1736 ::IPv4 address/96 up
1710 1737
1711 1738
1712 1739
1713 1740 SunOS 5.11 Last change: 21 Jan 2007 26
1714 1741
1715 1742
1716 1743
1717 1744
1718 1745
1719 1746
1720 1747 System Administration Commands ifconfig(1M)
1721 1748
1722 1749
1723 1750
1724 1751 where IPv4-address is the IPv4 address of the interface
1725 1752 through which the tunnel traffic will flow, and IPv4-
1726 1753 address, ::<IPv4-address>, is the corresponding IPv4-
1727 1754 compatible IPv6 address.
1728 1755
1729 1756
1730 1757 The following is an example of a configured tunnel:
1731 1758
1732 1759 example% ifconfig ip.tun0 inet6 plumb tsrc my-ipv4-address \
1733 1760 tdst peer-ipv4-address up
1734 1761
1735 1762
1736 1763
1737 1764
1738 1765 This creates a configured tunnel between my-ipv4-address and
1739 1766 peer-ipv4-address with corresponding link-local addresses.
1740 1767 For tunnels with global or site-local addresses, the logical
1741 1768 tunnel interfaces need to be configured in the following
1742 1769 form:
1743 1770
1744 1771 example% ifconfig ip.tun0 inet6 addif my-v6-address peer-v6-address up
1745 1772
1746 1773
1747 1774
1748 1775
1749 1776 For example,
1750 1777
1751 1778 example% ifconfig ip.tun0 inet6 plumb tsrc 109.146.85.57 \
1752 1779 tdst 109.146.85.212 up
1753 1780 example% ifconfig ip.tun0 inet6 addif 2::45 2::46 up
1754 1781
1755 1782
1756 1783
1757 1784
1758 1785 To show all IPv6 interfaces that are up and configured:
1759 1786
1760 1787 example% ifconfig -au6
1761 1788 ip.tun0: flags=2200851<UP,POINTOPOINT,RUNNING,MULTICAST,NONUD,IPv6>
1762 1789 mtu 1480 index 3
1763 1790 inet tunnel src 109.146.85.57 tunnel dst 109.146.85.212
1764 1791 tunnel security settings --> use 'ipsecconf -ln -i ip.tun1'
1765 1792 tunnel hop limit 60
1766 1793 inet6 fe80::6d92:5539/10 --> fe80::6d92:55d4
1767 1794 ip.tun0:1: flags=2200851<UP,POINTOPOINT,RUNNING,MULTICAST,NONUD,IPv6>
1768 1795 mtu 1480 index 3
1769 1796 inet6 2::45/128 --> 2::46
1770 1797
1771 1798
1772 1799
1773 1800
1774 1801 In the output above, note the line that begins with "tunnel
1775 1802 security settings". The content of this line varies
1776 1803
1777 1804
1778 1805
1779 1806 SunOS 5.11 Last change: 21 Jan 2007 27
1780 1807
1781 1808
1782 1809
1783 1810
1784 1811
1785 1812
1786 1813 System Administration Commands ifconfig(1M)
1787 1814
1788 1815
1789 1816
1790 1817 according to whether and how you have set your security set-
1791 1818 tings. See "Display of Tunnel Security Settings," below.
1792 1819
1793 1820 Configuring IPv4/IPv6 Tunnels
1794 1821 An IPv4 over IPv6 tunnel interface can send and receive IPv4
1795 1822 packets encapsulated in an IPv6 packet. Create tunnels at
1796 1823 both ends pointing to each other. IPv4 over IPv6 tunnels
1797 1824 require the tunnel source and tunnel destination IPv6 and
1798 1825 IPv4 addresses. The following demonstrates auto-tunnel con-
1799 1826 figuration:
1800 1827
1801 1828 example% ifconfig ip6.tun0 inet plumb tsrc my-ipv6-address \
1802 1829 tdst peer-ipv6-address my-ipv4-address \
1803 1830 peer-ipv4-address up
1804 1831
1805 1832
1806 1833
1807 1834
1808 1835 This creates a configured tunnel between my-ipv6-address and
1809 1836 peer-ipv6-address with my-ipv4-address and peer-ipv4-address
1810 1837 as the endpoints of the point-to-point interface, for exam-
1811 1838 ple:
1812 1839
1813 1840 example% ifconfig ip6.tun0 inet plumb tsrc fe80::1 tdst fe80::2 \
1814 1841 10.0.0.208 10.0.0.210 up
1815 1842
1816 1843
1817 1844
1818 1845
1819 1846 To show all IPv4 interfaces that are up and configured:
1820 1847
1821 1848 example% ifconfig -au4
1822 1849 lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
1823 1850 inet 127.0.0.1 netmask ff000000
1824 1851 eri0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 \
1825 1852 index 2
1826 1853 inet 172.17.128.208 netmask ffffff00 broadcast 172.17.128.255
1827 1854 ip6.tun0: flags=10008d1<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST,IPv4> \
1828 1855 mtu 1460
1829 1856 index 3
1830 1857 inet6 tunnel src fe80::1 tunnel dst fe80::2
1831 1858 tunnel security settings --> use 'ipsecconf -ln -i ip.tun1'
1832 1859 tunnel hop limit 60 tunnel encapsulation limit 4
1833 1860 inet 10.0.0.208 --> 10.0.0.210 netmask ff000000
1834 1861
1835 1862
1836 1863
1837 1864
1838 1865 In the output above, note the line that begins with "tunnel
1839 1866 security settings". The content of this line varies accord-
1840 1867 ing to whether and how you have set your security settings.
1841 1868 See "Display of Tunnel Security Settings," below.
1842 1869
1843 1870
1844 1871
1845 1872 SunOS 5.11 Last change: 21 Jan 2007 28
1846 1873
1847 1874
1848 1875
1849 1876
1850 1877
1851 1878
1852 1879 System Administration Commands ifconfig(1M)
1853 1880
1854 1881
1855 1882
1856 1883 Display of Tunnel Security Settings
1857 1884 The ifconfig output for tunneled interfaces indicates secu-
1858 1885 rity settings, if present, for a tunnel. The content of the
1859 1886 line showing your settings differs depending on how you have
1860 1887 made your settings:
1861 1888
1862 1889 o If you set your security policy using the ifconfig
1863 1890 -auth_algs, -encr_algs, and -encr_auth_algs options
1864 1891 and do not use ipsecconf(1M), ifconfig displays
1865 1892 your settings for each of these options.
1866 1893
1867 1894 o If you set your security policy using ipsecconf(1M)
1868 1895 with the tunnel keyword (the preferred method),
1869 1896 ifconfig displays:
1870 1897
1871 1898 tunnel security settings --> use 'ipsecconf -ln -i ip.tun1'
1872 1899
1873 1900
1874 1901 ...in effect, hiding your settings from those
1875 1902 without privileges to view them.
1876 1903
1877 1904 If you do net set security policy, using either
1878 1905 ifconfig or ipsecconf, there is no tunnel security
1879 1906 setting displayed.
1880 1907
1881 1908 EXAMPLES
1882 1909 Example 1 Using the ifconfig Command
1883 1910
1884 1911
1885 1912 If your workstation is not attached to an Ethernet, the net-
1886 1913 work interface, for example, eri0, should be marked "down"
1887 1914 as follows:
1888 1915
1889 1916
1890 1917 example% ifconfig eri0 down
1891 1918
1892 1919
1893 1920
1894 1921 Example 2 Printing Addressing Information
1895 1922
1896 1923
1897 1924 To print out the addressing information for each interface,
1898 1925 use the following command:
1899 1926
1900 1927
1901 1928 example% ifconfig -a
1902 1929
1903 1930
1904 1931
1905 1932 Example 3 Resetting the Broadcast Address
1906 1933
1907 1934
1908 1935
1909 1936
1910 1937
1911 1938 SunOS 5.11 Last change: 21 Jan 2007 29
1912 1939
1913 1940
1914 1941
1915 1942
1916 1943
1917 1944
1918 1945 System Administration Commands ifconfig(1M)
1919 1946
1920 1947
1921 1948
1922 1949 To reset each interface's broadcast address after the net-
1923 1950 masks have been correctly set, use the next command:
1924 1951
1925 1952
1926 1953 example% ifconfig -a broadcast +
1927 1954
1928 1955
1929 1956
1930 1957 Example 4 Changing the Ethernet Address
1931 1958
1932 1959
1933 1960 To change the Ethernet address for interface ce0, use the
1934 1961 following command:
1935 1962
1936 1963
1937 1964 example% ifconfig ce0 ether aa:1:2:3:4:5
1938 1965
1939 1966
1940 1967
1941 1968 Example 5 Configuring an IP-in-IP Tunnel
1942 1969
1943 1970
1944 1971 To configure an IP-in-IP tunnel, first plumb it with the
1945 1972 following command:
1946 1973
1947 1974
1948 1975 example% ifconfig ip.tun0 plumb
1949 1976
1950 1977
1951 1978
1952 1979
1953 1980 Then configure it as a point-to-point interface, supplying
1954 1981 the tunnel source and the tunnel destination:
1955 1982
1956 1983
1957 1984 example% ifconfig ip.tun0 myaddr mydestaddr tsrc another_myaddr \
1958 1985 tdst a_dest_addr up
1959 1986
1960 1987
1961 1988
1962 1989
1963 1990 Use ipsecconf(1M), as described above, to configure tunnel
1964 1991 security properties.
1965 1992
1966 1993
1967 1994 Example 6 Configuring 6to4 Tunnels
1968 1995
1969 1996
1970 1997 To configure 6to4 tunnels, use the following commands:
1971 1998
1972 1999
1973 2000 example% ifconfig ip.6to4tun0 inet6 plumb
1974 2001
1975 2002
1976 2003
1977 2004 SunOS 5.11 Last change: 21 Jan 2007 30
1978 2005
1979 2006
1980 2007
1981 2008
1982 2009
1983 2010
1984 2011 System Administration Commands ifconfig(1M)
1985 2012
1986 2013
1987 2014
1988 2015 example% ifconfig ip.6to4tun0 inet6 tsrc IPv4-address 6to4-address/64 up
1989 2016
1990 2017
1991 2018
1992 2019
1993 2020 IPv4-address denotes the address of the encapsulating inter-
1994 2021 face. 6to4-address denotes the address of the local IPv6
1995 2022 address of form 2002:IPv4-address:SUBNET-ID:HOSTID.
1996 2023
1997 2024
1998 2025
1999 2026 The long form should be used to resolve any potential con-
2000 2027 flicts that might arise if the system administrator utilizes
2001 2028 an addressing plan where the values for SUBNET-ID or HOSTID
2002 2029 are reserved for something else.
2003 2030
2004 2031
2005 2032
2006 2033 After the interface is plumbed, a 6to4 tunnel can be config-
2007 2034 ured as follows:
2008 2035
2009 2036
2010 2037 example% ifconfig ip.6to4tun0 inet6 tsrc IPv4-address up
2011 2038
2012 2039
2013 2040
2014 2041
2015 2042 This short form sets the address. It uses the convention:
2016 2043
2017 2044
2018 2045 2002:IPv4-address::1
2019 2046
2020 2047
2021 2048
2022 2049 The SUBNET-ID is 0, and the HOSTID is 1.
2023 2050
2024 2051
2025 2052 Example 7 Configuring IP Forwarding on an Interface
2026 2053
2027 2054
2028 2055 To enable IP forwarding on a single interface, use the fol-
2029 2056 lowing command:
2030 2057
2031 2058
2032 2059 example% ifconfig eri0 router
2033 2060
2034 2061
2035 2062
2036 2063
2037 2064 To disable IP forwarding on a single interface, use the fol-
2038 2065 lowing command:
2039 2066
2040 2067
2041 2068
2042 2069
2043 2070 SunOS 5.11 Last change: 21 Jan 2007 31
2044 2071
2045 2072
2046 2073
2047 2074
2048 2075
2049 2076
2050 2077 System Administration Commands ifconfig(1M)
2051 2078
2052 2079
2053 2080
2054 2081 example% ifconfig eri0 -router
2055 2082
2056 2083
2057 2084
2058 2085 Example 8 Configuring Source Address Selection Using a Vir-
2059 2086 tual Interface
2060 2087
2061 2088
2062 2089 The following command configures source address selection
2063 2090 such that every packet that is locally generated with no
2064 2091 bound source address and going out on qfe2 prefers a source
2065 2092 address hosted on vni0.
2066 2093
2067 2094
2068 2095 example% ifconfig qfe2 usesrc vni0
2069 2096
2070 2097
2071 2098
2072 2099
2073 2100 The ifconfig -a output for the qfe2 and vni0 interfaces
2074 2101 displays as follows:
2075 2102
2076 2103
2077 2104 qfe2: flags=1100843<UP,BROADCAST,RUNNING,MULTICAST,ROUTER,IPv4> mtu
2078 2105 1500 index 4
2079 2106 usesrc vni0
2080 2107 inet 1.2.3.4 netmask ffffff00 broadcast 1.2.3.255
2081 2108 ether 0:3:ba:17:4b:e1
2082 2109 vni0: flags=20011100c1<UP,RUNNING,NOARP,NOXMIT,ROUTER,IPv4,VIRTUAL>
2083 2110 mtu 0 index 5
2084 2111 srcof qfe2
2085 2112 inet 3.4.5.6 netmask ffffffff
2086 2113
2087 2114
2088 2115
2089 2116 Observe, above, the usesrc and srcof keywords in the ifcon-
|
↓ open down ↓ |
452 lines elided |
↑ open up ↑ |
2090 2117 fig output. These keywords also appear on the logical
2091 2118 instances of the physical interface, even though this is a
2092 2119 per-physical interface parameter. There is no srcof keyword
2093 2120 in ifconfig for configuring interfaces. This information is
2094 2121 determined automatically from the set of interfaces that
2095 2122 have usesrc set on them.
2096 2123
2097 2124
2098 2125
2099 2126 The following command, using the none keyword, undoes the
2100 - effect of the preceding ifconfig usersrc command.
2127 + effect of the preceding *ifconfig* *usesrc* command.
2101 2128
2102 2129
2103 2130 example% ifconfig qfe2 usesrc none
2104 2131
2105 2132
2106 2133
2107 2134
2108 2135
2109 2136 SunOS 5.11 Last change: 21 Jan 2007 32
2110 2137
2111 2138
2112 2139
2113 2140
2114 2141
2115 2142
2116 2143 System Administration Commands ifconfig(1M)
2117 2144
2118 2145
2119 2146
2120 2147 Following this command, ifconfig -a output displays as fol-
2121 2148 lows:
2122 2149
2123 2150
2124 2151 qfe2: flags=1100843<UP,BROADCAST,RUNNING,MULTICAST,ROUTER,IPv4> mtu
2125 2152 1500 index 4
2126 2153 inet 1.2.3.4 netmask ffffff00 broadcast 1.2.3.255
2127 2154 ether 0:3:ba:17:4b:e1
2128 2155 vni0: flags=20011100c1<UP,RUNNING,NOARP,NOXMIT,ROUTER,IPv4,VIRTUAL>
2129 2156 mtu 0 index 5
2130 2157 inet 3.4.5.6 netmask ffffffff
2131 2158
2132 2159
2133 2160
2134 2161 Note the absence of the usesrc and srcof keywords in the
2135 2162 output above.
2136 2163
2137 2164
2138 2165 Example 9 Configuring Source Address Selection for an IPv6
2139 2166 Address
2140 2167
2141 2168
2142 2169 The following command configures source address selection
2143 2170 for an IPv6 address, selecting a source address hosted on
2144 2171 vni0.
2145 2172
2146 2173
2147 2174 example% ifconfig qfe1 inet6 usesrc vni0
2148 2175
2149 2176
2150 2177
2151 2178
2152 2179 Following this command, ifconfig -a output displays as fol-
2153 2180 lows:
2154 2181
2155 2182
2156 2183 qfe1: flags=2000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 3
2157 2184 usesrc vni0
2158 2185 inet6 fe80::203:baff:fe17:4be0/10
2159 2186 ether 0:3:ba:17:4b:e0
2160 2187 vni0: flags=2002210041<UP,RUNNING,NOXMIT,NONUD,IPv6,VIRTUAL> mtu 0
2161 2188 index 5
2162 2189 srcof qfe1
2163 2190 inet6 fe80::203:baff:fe17:4444/128
2164 2191 vni0:1: flags=2002210040<RUNNING,NOXMIT,NONUD,IPv6,VIRTUAL> mtu 0
2165 2192 index 5
2166 2193 srcof qfe1
2167 2194 inet6 fec0::203:baff:fe17:4444/128
2168 2195 vni0:2: flags=2002210040<RUNNING,NOXMIT,NONUD,IPv6,VIRTUAL> mtu 0
2169 2196 index 5
2170 2197 srcof qfe1
2171 2198 inet6 2000::203:baff:fe17:4444/128
2172 2199
2173 2200
2174 2201
2175 2202 SunOS 5.11 Last change: 21 Jan 2007 33
2176 2203
2177 2204
2178 2205
2179 2206
2180 2207
2181 2208
2182 2209 System Administration Commands ifconfig(1M)
2183 2210
2184 2211
2185 2212
2186 2213 Depending on the scope of the destination of the packet
2187 2214 going out on qfe1, the appropriately scoped source address
2188 2215 is selected from vni0 and its aliases.
2189 2216
2190 2217
2191 2218 Example 10 Using Source Address Selection with Shared-IP
2192 2219 Zones
2193 2220
2194 2221
2195 2222 The following is an example of how the usesrc feature can be
2196 2223 used with the zones(5) facility in Solaris. The following
2197 2224 commands are invoked in the global zone:
2198 2225
2199 2226
2200 2227 example% ifconfig hme0 usesrc vni0
2201 2228 example% ifconfig eri0 usesrc vni0
2202 2229 example% ifconfig qfe0 usesrc vni0
2203 2230
2204 2231
2205 2232
2206 2233
2207 2234 Following the preceding commands, the ifconfig -a output for
2208 2235 the virtual interfaces would display as:
2209 2236
2210 2237
2211 2238 vni0: flags=20011100c1<UP,RUNNING,NOARP,NOXMIT,ROUTER,IPv4,VIRTUAL>
2212 2239 mtu 0 index 23
2213 2240 srcof hme0 eri0 qfe0
2214 2241 inet 10.0.0.1 netmask ffffffff
2215 2242 vni0:1:
2216 2243 flags=20011100c1<UP,RUNNING,NOARP,NOXMIT,ROUTER,IPv4,VIRTUAL> mtu 0
2217 2244 index 23
2218 2245 zone test1
2219 2246 srcof hme0 eri0 qfe0
2220 2247 inet 10.0.0.2 netmask ffffffff
2221 2248 vni0:2:
2222 2249 flags=20011100c1<UP,RUNNING,NOARP,NOXMIT,ROUTER,IPv4,VIRTUAL> mtu 0
2223 2250 index 23
2224 2251 zone test2
2225 2252 srcof hme0 eri0 qfe0
2226 2253 inet 10.0.0.3 netmask ffffffff
2227 2254 vni0:3:
2228 2255 flags=20011100c1<UP,RUNNING,NOARP,NOXMIT,ROUTER,IPv4,VIRTUAL> mtu 0
2229 2256 index 23
2230 2257 zone test3
2231 2258 srcof hme0 eri0 qfe0
2232 2259 inet 10.0.0.4 netmask ffffffff
2233 2260
2234 2261
2235 2262
2236 2263 There is one virtual interface alias per zone (test1, test2,
2237 2264 and test3). A source address from the virtual interface
2238 2265
2239 2266
2240 2267
2241 2268 SunOS 5.11 Last change: 21 Jan 2007 34
2242 2269
2243 2270
2244 2271
2245 2272
2246 2273
2247 2274
2248 2275 System Administration Commands ifconfig(1M)
2249 2276
2250 2277
2251 2278
2252 2279 alias in the same zone is selected. The virtual interface
2253 2280 aliases were created using zonecfg(1M) as follows:
2254 2281
2255 2282
2256 2283 example% zonecfg -z test1
2257 2284 zonecfg:test1> add net
2258 2285 zonecfg:test1:net> set physical=vni0
2259 2286 zonecfg:test1:net> set address=10.0.0.2
2260 2287
2261 2288
2262 2289
2263 2290
2264 2291 The test2 and test3 zone interfaces and addresses are
2265 2292 created in the same way.
2266 2293
2267 2294
2268 2295 Example 11 Turning Off DHCPv6
2269 2296
2270 2297
2271 2298 The following example shows how to disable automatic use of
2272 2299 DHCPv6 on all interfaces, and immediately shut down DHCPv6
2273 2300 on the interface named hme0. See in.ndpd(1M) and
2274 2301 ndpd.conf(4) for more information on the automatic DHCPv6
2275 2302 configuration mechanism.
2276 2303
2277 2304
2278 2305 example% echo ifdefault StatefulAddrConf false >> /etc/inet/ndpd.conf
2279 2306 example% pkill -HUP -x in.ndpd
2280 2307 example% ifconfig hme0 dhcp release
2281 2308
2282 2309
2283 2310
2284 2311 FILES
2285 2312 /etc/netmasks
2286 2313
2287 2314 Netmask data.
2288 2315
2289 2316
2290 2317 /etc/default/inet_type
2291 2318
2292 2319 Default Internet protocol type.
2293 2320
2294 2321
2295 2322 ATTRIBUTES
2296 2323 See attributes(5) for descriptions of the following attri-
2297 2324 butes:
2298 2325
2299 2326
2300 2327
2301 2328
2302 2329
2303 2330
2304 2331
2305 2332
2306 2333
2307 2334 SunOS 5.11 Last change: 21 Jan 2007 35
2308 2335
2309 2336
2310 2337
2311 2338
2312 2339
2313 2340
2314 2341 System Administration Commands ifconfig(1M)
2315 2342
2316 2343
2317 2344
2318 2345 _______________________________________________________________________
2319 2346 | ATTRIBUTE TYPE | ATTRIBUTE VALUE |
2320 2347 |_______________________________________|______________________________|
2321 2348 | Availability | SUNWcsu |
|
↓ open down ↓ |
211 lines elided |
↑ open up ↑ |
2322 2349 |_______________________________________|______________________________|
2323 2350 | Interface Stability for command-line| Committed |
2324 2351 | options | |
2325 2352 |_______________________________________|______________________________|
2326 2353 | Interface Stability for command output| Uncommitted |
2327 2354 |_______________________________________|______________________________|
2328 2355
2329 2356
2330 2357 SEE ALSO
2331 2358 dhcpinfo(1), dhcpagent(1M), in.mpathd(1M), in.ndpd(1M),
2332 - in.routed(1M), ipsecconf(1M), ndd(1M), netstat(1M),
2359 + in.routed(1M), ipmpstat(1M), ipsecconf(1M), netstat(1M),
2333 2360 zoneadm(1M), zonecfg(1M), ethers(3SOCKET),
2334 2361 gethostbyname(3NSL), getnetbyname(3SOCKET), hosts(4),
2335 2362 inet_type(4), ndpd.conf(4), netmasks(4), networks(4),
2336 2363 nsswitch.conf(4), attributes(5), privileges(5), zones(5),
2337 2364 arp(7P), ipsecah(7P), ipsecesp(7P), tun(7M)
2338 2365
2339 2366
2340 2367 DIAGNOSTICS
2341 2368 ifconfig sends messages that indicate if:
2342 2369
2343 2370 o the specified interface does not exist
2344 2371
2345 2372 o the requested address is unknown
2346 2373
2347 2374 o the user is not privileged and tried to alter an
2348 2375 interface's configuration
2349 2376
2350 2377 NOTES
2351 2378 Do not select the names broadcast, down, private, trailers,
2352 2379 up or other possible option names when you choose host
2353 2380 names. If you choose any one of these names as host names,
2354 2381 it can cause unusual problems that are extremely difficult
2355 2382 to diagnose.
2356 2383
2357 2384
2358 2385
2359 2386
2360 2387
2361 2388
2362 2389
2363 2390
2364 2391
2365 2392
2366 2393
2367 2394
2368 2395
2369 2396
2370 2397
2371 2398
2372 2399
2373 2400 SunOS 5.11 Last change: 21 Jan 2007 36
2374 2401
2375 2402
2376 2403
|
↓ open down ↓ |
34 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX