Manual:IP/Address: Difference between revisions
m Protected "IP/Address": manual [edit=sysop:move=sysop] |
|||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Versions|2.9, v3, v4 +}} | |||
__TOC__ | |||
<div class=manual> | <div class=manual> | ||
==Summary== | |||
<p><b>Sub-menu:</b> <code>/ip address</code></ | <p id="shbox"><b>Sub-menu:</b> <code>/ip address</code><br /> | ||
<b>Standards:</b> <code>IPv4 RFC 791</code> | |||
</p> | |||
<br /> | <br /> | ||
<p> | <p> | ||
Line 20: | Line 25: | ||
</p> | </p> | ||
==Properties== | |||
<table class="styled_table"> | <table class="styled_table"> | ||
Line 33: | Line 38: | ||
<tr> | <tr> | ||
<td><var><b>broadcast</b></var> (<em>IP</em>; Default: <b>255.255.255.255</b>)</td> | <td><var><b>broadcast</b></var> (<em>IP</em>; Default: <b>255.255.255.255</b>)</td> | ||
<td>roadcasting IP address, calculated by default from an IP address and a network mask</td> | <td>roadcasting IP address, calculated by default from an IP address and a network mask. Starting from v5RC6 this parameter is removed</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 45: | Line 50: | ||
<tr> | <tr> | ||
<td><var><b>network</b></var> (<em>IP</em>; Default: <b>0.0.0.0</b>)</td> | <td><var><b>network</b></var> (<em>IP</em>; Default: <b>0.0.0.0</b>)</td> | ||
<td>IP address for the network. For point-to-point links it should be the address of the remote end</td> | <td>IP address for the network. For point-to-point links it should be the address of the remote end. Starting from v5RC6 this parameter is configurable only for addresses with /32 netmask (point to point links)</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
<br /> | |||
Read only properties | Read only properties | ||
Line 60: | Line 66: | ||
</tr> | </tr> | ||
</table> | </table> | ||
<br /> | |||
<p> | |||
Two IP addresses from the same network assigned to routers different interfaces are not valid unless [[Virtual_Routing_and_Forwarding | VRF]] is used. For example, the combination of IP address 10.0.0.1/24 on the <b>ether1</b> interface and IP address 10.0.0.132/24 on the <b>ether2</b> interface is invalid, because both addresses belong to the same network 10.0.0.0/24. Use addresses from different networks on different interfaces, or enable proxy-arp on ether1 or ether2. | |||
</p> | |||
===Example=== | |||
<pre> | |||
[admin@MikroTik] ip address> add address=10.10.10.1/24 interface=ether2 | |||
[admin@MikroTik] ip address> print | |||
Flags: X - disabled, I - invalid, D - dynamic | |||
# ADDRESS NETWORK BROADCAST INTERFACE | |||
0 2.2.2.1/24 2.2.2.0 2.2.2.255 ether2 | |||
1 10.5.7.244/24 10.5.7.0 10.5.7.255 ether1 | |||
2 10.10.10.1/24 10.10.10.0 10.10.10.255 ether2 | |||
[admin@MikroTik] ip address> | |||
</pre> | |||
</div> | </div> | ||
[[Category:Manual]] | <br /> | ||
{{cont}} | |||
[[Category:Manual|A]] | |||
[[Category:IP|A]] |
Latest revision as of 12:50, 10 February 2011
Applies to RouterOS: 2.9, v3, v4 +
Summary
Sub-menu: /ip address
Standards: IPv4 RFC 791
IP addresses serve for a general host identification purposes in IP networks. Typical (IPv4) address consists of four octets. For proper addressing the router also needs the network mask value, id est which bits of the complete IP address refer to the address of the host, and which - to the address of the network. The network address value is calculated by binary AND operation from network mask and IP address values. It's also possible to specify IP address followed by slash "/" and the amount of bits that form the network address.
In most cases, it is enough to specify the address, the netmask, and the interface arguments. The network prefix and the broadcast address are calculated automatically.
It is possible to add multiple IP addresses to an interface or to leave the interface without any addresses assigned to it. In case of bridging or PPPoE connection, the physical interface may bot have any address assigned, yet be perfectly usable. Putting an IP address to a physical interface included in a bridge would mean actually putting it on the bridge interface itself. You can use /ip address print detail to see to which interface the address belongs to.
MikroTik RouterOS has following types of addresses:
- Static - manually assigned to the interface by a user
- Dynamic - automatically assigned to the interface by DHCP or an estabilished PPP connections
Properties
Property | Description |
---|---|
address (IP/Mask; Default: ) | IP address |
broadcast (IP; Default: 255.255.255.255) | roadcasting IP address, calculated by default from an IP address and a network mask. Starting from v5RC6 this parameter is removed |
interface (name; Default: ) | Interface name the IP address is assigned to |
netmask (IP; Default: 0.0.0.0) | Delimits network address part of the IP address from the host part |
network (IP; Default: 0.0.0.0) | IP address for the network. For point-to-point links it should be the address of the remote end. Starting from v5RC6 this parameter is configurable only for addresses with /32 netmask (point to point links) |
Read only properties
Property | Description |
---|---|
actual-interface (name) | Name of the actual interface the logical one is bound to. For example, if the physical interface you assigned the address to, is included in a bridge, the actual interface will show that bridge |
Two IP addresses from the same network assigned to routers different interfaces are not valid unless VRF is used. For example, the combination of IP address 10.0.0.1/24 on the ether1 interface and IP address 10.0.0.132/24 on the ether2 interface is invalid, because both addresses belong to the same network 10.0.0.0/24. Use addresses from different networks on different interfaces, or enable proxy-arp on ether1 or ether2.
Example
[admin@MikroTik] ip address> add address=10.10.10.1/24 interface=ether2 [admin@MikroTik] ip address> print Flags: X - disabled, I - invalid, D - dynamic # ADDRESS NETWORK BROADCAST INTERFACE 0 2.2.2.1/24 2.2.2.0 2.2.2.255 ether2 1 10.5.7.244/24 10.5.7.0 10.5.7.255 ether1 2 10.10.10.1/24 10.10.10.0 10.10.10.255 ether2 [admin@MikroTik] ip address>
[ Top | Back to Content ]