如何在 vSRX (GNS3) 上使用 VLAN 设置 DHCP?

网络工程 dhcp 杜松-srx gns3
2022-02-17 00:36:40

我尝试在主机上设置 DHCP,但找不到 DHCP 服务器。我应该做些什么?

在此处输入图像描述

在此处输入图像描述

system {
    root-authentication {
        encrypted-password "$1$AZZi5zCr$CoHgrnTOOXUpyaCJm3XLn/"; ## SECRET-DAT
    }
    services {
        ssh;
        web-management {
            http {
                interface ge-0/0/0.0;
            }
        }
        dhcp {
            pool 192.168.10.0/24 {
                address-range low 192.168.10.2 high 192.168.10.254;
                router {
                    192.168.10.1;
                }
            }
            pool 192.168.20.0/24 {
                address-range low 192.168.20.2 high 192.168.20.254;
                router {
                    192.168.20.1;
                }
            }
        }
    }
    syslog {
        user * {
            any emergency;
        }
        file messages {
            any any;
            authorization info;
        }
        file interactive-commands {
            interactive-commands any;
        }
    }
    license {
        autoupdate {
            url https://ae1.juniper.net/junos/key_retrieval;
        }
    }
}
interfaces {
    ge-0/0/0 {
        vlan-tagging;
        unit 0 {
            vlan-id 2;
            family inet {
                address 192.168.20.1/24;
            }
        }
    }
    ge-0/0/1 {
        unit 0 {
            family inet {
                address 192.168.10.1/24;
            }
        }
    }
}
security {
    screen {
        ids-option untrust-screen {
            icmp {
                ping-death;
            }
            ip {
                source-route-option;
                tear-drop;
            }
            tcp {
                syn-flood {
                    alarm-threshold 1024;
                    attack-threshold 200;
                    source-threshold 1024;
                    destination-threshold 2048;
                    queue-size 2000; ## Warning: 'queue-size' is deprecated
                    timeout 20;
                }
                land;
            }
        }
    }
    policies {
        from-zone trust to-zone trust {
            policy default-permit {
                match {
                    source-address any;
                    destination-address any;
                    application any;
                }
                then {
                    permit;
                }
            }
        }
        from-zone trust to-zone untrust {
            policy default-permit {
                match {
                    source-address any;
                    destination-address any;
                    application any;
                }
                then {
                    permit;
                }
            }
        }
        from-zone untrust to-zone trust {
            policy default-deny {
                match {
                    source-address any;
                    destination-address any;
                    application any;
                }
                then {
                    deny;
                }
            }
        }
    }
    zones {
        security-zone trust {
            tcp-rst;
        }
        security-zone untrust {
            screen untrust-screen;
            interfaces {
                ge-0/0/0.0 {
                    host-inbound-traffic {
                        system-services {
                            http;
                            https;
                            ssh;
                            telnet;
                            dhcp;
                            ping;
                        }
                    }
                }
                ge-0/0/1.0 {
                    host-inbound-traffic {
                        system-services {
                            ping;
                            dhcp;
                        }
                    }
                }
            }
        }
    }
}
1个回答

您的意思是 PC 3 和 PC 4 都找不到 DHCP 吗?您可能必须在子接口上配置 DHCP 帮助程序,以将 DHCP 请求从您的 PC 转发到预期的 DHCP 服务器

希望这可以帮助