Difference between revisions of "DHCP JUNOS"
From Teknologisk videncenter
m (Created page with "=DHCP Server= Som så mange andre netværks enheder understøtter JUNOS også DHCP server funktionen. Den konfigureres under [ system services dhcp ] stanza'en. Konfigurationen f...") |
m (→Referencer) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=DHCP Server= | =DHCP Server= | ||
− | Som så mange andre netværks enheder understøtter JUNOS også DHCP server funktionen. Den konfigureres under [ system services dhcp ] stanza'en. Konfigurationen finder selv sammen med adresserne der er konfigureret på et interface. | + | Som så mange andre netværks enheder understøtter JUNOS også DHCP server funktionen. Den konfigureres under '''[ system services dhcp ]''' stanza'en. Konfigurationen finder selv sammen med adresserne der er konfigureret på et interface. |
<source lang=cli> | <source lang=cli> | ||
[edit system services dhcp] | [edit system services dhcp] | ||
Line 45: | Line 45: | ||
[edit system services dhcp] | [edit system services dhcp] | ||
− | rael@SRX240# < | + | rael@SRX240# <input>run show system services dhcp pool</input> |
Pool name Low address High address Excluded addresses | Pool name Low address High address Excluded addresses | ||
10.0.0.0/30 10.0.0.1 10.0.0.2 10.0.0.1 | 10.0.0.0/30 10.0.0.1 10.0.0.2 10.0.0.1 | ||
Line 58: | Line 58: | ||
</source> | </source> | ||
Husk at protokollen selvfølgelig skal tillades i zonen hvis der arbejdes i flow-based | Husk at protokollen selvfølgelig skal tillades i zonen hvis der arbejdes i flow-based | ||
+ | |||
=DHCP Client= | =DHCP Client= | ||
Her er RVI interfacet vlan.99 konfigureret til DHCP client. | Her er RVI interfacet vlan.99 konfigureret til DHCP client. | ||
Line 86: | Line 87: | ||
Mangler | Mangler | ||
=Referencer= | =Referencer= | ||
+ | [http://kb.juniper.net/InfoCenter/index?page=content&id=KB21169 How to set up a DHCP server on SRX with the DHCP clients in a non-default routing instance] | ||
<references/> | <references/> | ||
{{Source cli}} | {{Source cli}} | ||
[[Category:Juniper]] | [[Category:Juniper]] | ||
[[Category:SRX Flow-Based Forwarding]] | [[Category:SRX Flow-Based Forwarding]] | ||
+ | [[Category:DHCP]] |
Latest revision as of 08:54, 16 January 2015
DHCP Server
Som så mange andre netværks enheder understøtter JUNOS også DHCP server funktionen. Den konfigureres under [ system services dhcp ] stanza'en. Konfigurationen finder selv sammen med adresserne der er konfigureret på et interface.
[edit system services dhcp]
rael@SRX240# <input>show</input>
pool 10.0.255.0/24 {
address-range low 10.0.255.10 high 10.0.255.250;
name-server {
172.16.4.77;
}
router {
10.0.255.1;
}
propagate-settings vlan.99;
}
her er konfigureret et pool med range, DNS og Router settings. Ud over de definerede options arver den automatisk options fra vlan.99 interfacet, der er konfigureret til DHCP Klient.
Options kan både ligge i scopet eller globalt på serveren.
Show kommandoer
[edit system services dhcp]
rael@SRX240# <input>run show system services dhcp binding</input>
IP address Hardware address Type Lease expires at
10.0.255.10 00:0c:29:8b:0a:49 dynamic 2015-01-12 14:13:57 UTC
10.0.0.2 84:b5:9c:2d:c5:c0 dynamic 2015-01-12 14:55:29 UTC
[edit system services dhcp]
rael@SRX240# <input>run show system services dhcp statistics</input>
Packets dropped:
Total 0
Messages received:
BOOTREQUEST 0
DHCPDECLINE 0
<notice>DHCPDISCOVER 2</notice>
DHCPINFORM 0
DHCPRELEASE 0
<notice>DHCPREQUEST 2</notice>
Messages sent:
BOOTREPLY 0
DHCPOFFER 2
DHCPACK 2
DHCPNAK 0
[edit system services dhcp]
rael@SRX240# <input>run show system services dhcp pool</input>
Pool name Low address High address Excluded addresses
10.0.0.0/30 10.0.0.1 10.0.0.2 10.0.0.1
10.0.0.4/30 10.0.0.5 10.0.0.6 10.0.0.5
10.0.0.8/30 10.0.0.9 10.0.0.10 10.0.0.9
10.0.0.12/30 10.0.0.13 10.0.0.14 10.0.0.13
10.0.0.16/30 10.0.0.17 10.0.0.18 10.0.0.17
10.0.0.20/30 10.0.0.21 10.0.0.22 10.0.0.21
10.0.0.24/30 10.0.0.25 10.0.0.26 10.0.0.25
<notice>10.0.255.0/24 10.0.255.10 10.0.255.250</notice>
Husk at protokollen selvfølgelig skal tillades i zonen hvis der arbejdes i flow-based
DHCP Client
Her er RVI interfacet vlan.99 konfigureret til DHCP client.
[edit]
rael@SRX240# <input>show interfaces vlan.99</input>
family inet {
dhcp;
}
[edit]
rael@SRX240# show security zones
security-zone untrust {
screen untrust-screen;
interfaces {
<notice>vlan.99</notice> {
host-inbound-traffic {
system-services {
<notice>dhcp;</notice>
tftp;
}
}
}
}
}
DHCP Relay
Mangler
Referencer
How to set up a DHCP server on SRX with the DHCP clients in a non-default routing instance