PPPoE Konfiguration mit Juniper SRX (Junos)
Seit Kurzem arbeite ich mich verstärkt in die Juniper SRX Serie, mit Junos als alternative zum ScreenOS der SSG´s, ein. Heute musste die SRX per DSL mit dem Internet verbunden werden und dementsprechend mit einer PPPoE Konfiguration versorgt werden. Hier beschreibe ich einmal die notwenigen Konfigurationsschritte:
Zuerst muss man das Interface, welches mit dem DSL-Modem verbunden ist, auf Verbindungsart PPPoE einstellen. Bei mir ist es das Interface fe-0/0/1 also das 2. physikalische Interface.
set interfaces fe-0/0/1 unit 0 encapsulation ppp-over-ether
Jetzt müssen auf einem neuen DSL-Interface die Zugangsdaten und DSL-Einwahl-Optionen hinterlegt werden. Das erste DSL-Interface ist das Interface pp0.
set interfaces pp0 unit 0 ppp-options pap local-name “BENUTZENAME”
set interfaces pp0 unit 0 ppp-options pap local-password “PASSWORT”
set interfaces pp0 unit 0 ppp-options pap passive
set interfaces pp0 unit 0 pppoe-options underlying-interface fe-0/0/1.0
set interfaces pp0 unit 0 pppoe-options idle-timeout 0
set interfaces pp0 unit 0 pppoe-options auto-reconnect 10
set interfaces pp0 unit 0 pppoe-options client
set interfaces pp0 unit 0 family inet mtu 1492
set interfaces pp0 unit 0 family inet negotiate-address
Nun müssen wir der SRX nur noch beibringen das sie den Internet Traffic auch über die DSL-Leitung routet. Dazulegen wir einfach das Defaultgateway auf das DSL-Interface.
set routing-options static route 0.0.0.0/0 next-hop pp0.0 metric 0
Das die Firewall-Policy und Ausgehen NAT eingeschaltet sein muss setzte ich jetzt mal als gegeben voraus. Bei mir hatte ich mit meiner 1&1 Einwahl noch Probleme mit der MTU sodass ich z.B. die Website www.bahn.de nicht erreichen konnte. Dieses konnte ich mit folgendem Eintrag beheben:
set security flow tcp-mss all-tcp mss 1452
Hier noch einmal die Konfiguration in der Übersicht:
interfaces {
fe-0/0/1 {
description DSL-Modem;
unit 0 {
encapsulation ppp-over-ether;
}
}
pp0 {
unit 0 {
ppp-options {
pap {
local-name "ZUGANSDATEN";
local-password "PASSWORT"; ## SECRET-DATA
passive;
}
}
pppoe-options {
underlying-interface fe-0/0/1.0;
idle-timeout 0;
auto-reconnect 10;
client;
}
family inet {
mtu 1492;
negotiate-address;
}
}
}
}
routing-options {
static {
route 0.0.0.0/0 {
next-hop pp0.0;
metric 0;
}
}
}
security {
flow {
tcp-mss {
all-tcp {
mss 1452;
}
}
}
}
Herzlich Willkommen auf caarn.de. Mein Name ist Markus Nölker und auf diesem Blog möchte ich Euch ein wenig über meine Arbeit, Hobbys und Reisen erzählen. Wer mehr über mich erfahren möchte, klickt bitte
hi
ich spiele auch ein wenig mit der srx an einem telekom vdsl anschluss.
routing wird im moment von einer freebsd kiste und einer pfsense erledigt. und funktioniert. da ich KEIN entertain gebucht habe, habe ich auch nciht den bedarf ein vlan zu setzen. sollte also schick sein.
die config ist mit deiner auch vergleichbar, und die flow option habe ich nach lesen deines artikels auch gesetzt.
wirklich unterscheidet sich folgender teil:
pppoe-options {
underlying-interface fe-0/0/0.0;
idle-timeout 0;
service-name Telekom;
auto-reconnect 30;
client
}
doof ist nur, das ich wenn ich das geraet an die leitung haenge, der einfach keine ip bekommt.
nun sollte die drunterliegende technick vergleichbar sein, da 1&1 telekom reseller ist.
hast du einen hint wie ich das geraet zum ip holen bekommen koennte?
vielen dank
Hallo Volker,
hast du unter pp0 / unit 0 auch
family inet {
mtu 1492;
negotiate-address;
}
gesetzte? Was sagt: “show interfaces pp0 extensive” bzw. “show pppoe interfaces” ?
Gruß
Markus
Hallo Volker,
hast du unter pp0 / unit 0 auch
family inet {
mtu 1492;
negotiate-address;
}
gesetzte? Was sagt: “show interfaces pp0 extensive” bzw. “show pppoe interfaces” ?
Gruß
Markus
Markus Noelker kommentiert zu caarn.de:
Hallo Volker,
hast du unter pp0 / unit 0 auch
family inet {
mtu 1492;
negotiate-address;
}
gesetzte? Was sagt: “show interfaces pp0 extensive” bzw. “show pppoe interfaces” ?
Gruß
Markus
}
family inet {
mtu 1492;
negotiate-address;
}
ist gesetzt.
im moment ist die juniper nicht am dsl modem,
wenn du den output magst wenn sie da dran haengt, ist das auch kein proplem.
und ich paste einfach mal den kompletten output des show commands:
root@anduin> show interfaces pp0 extensive
Physical interface: pp0, Enabled, Physical link is Up
Interface index: 128, SNMP ifIndex: 522, Generation: 131
Type: PPPoE, Link-level type: PPPoE, MTU: 1532, Speed: Unspecified
Device flags : Present Running
Interface flags: Point-To-Point SNMP-Traps
Link type : Full-Duplex
Link flags : None
Physical info : Unspecified
Hold-times : Up 0 ms, Down 0 ms
Current address: Unspecified, Hardware address: Unspecified
Alternate link address: Unspecified
Statistics last cleared: Never
Traffic statistics:
Input bytes : 0
Output bytes : 0
Input packets: 0
Output packets: 0
Input errors:
Errors: 0, Drops: 0, Framing errors: 0, Runts: 0, Giants: 0,
Policed discards: 0, Resource errors: 0
Output errors:
Carrier transitions: 0, Errors: 0, Drops: 0, MTU errors: 0,
Resource errors: 0
Logical interface pp0.0 (Index 80) (SNMP ifIndex 531) (Generation 146)
Flags: Hardware-Down Point-To-Point SNMP-Traps 0×0 Encapsulation: PPPoE
PPPoE:
State: SessionDown, Session ID: None,
Configured AC name: None, Service name: Telekom,
Auto-reconnect timeout: 30 seconds, Idle timeout: Never,
Underlying interface: fe-0/0/0.0 (Index 79)
Traffic statistics:
Input bytes : 800
Output bytes : 700
Input packets: 20
Output packets: 18
Local statistics:
Input bytes : 800
Output bytes : 700
Input packets: 20
Output packets: 18
Transit statistics:
Input bytes : 0 0 bps
Output bytes : 0 0 bps
Input packets: 0 0 pps
Output packets: 0 0 pps
Keepalive settings: Interval 10 seconds, Up-count 1, Down-count 3
Keepalive statistics:
Input : 0 (last seen: never)
Output: 6 (last sent 87:59:18 ago)
LCP state: Down
NCP state: inet: Down, inet6: Not-configured, iso: Not-configured, mpls:
Not-configured
CHAP state: Closed
PAP state: Closed
Security: Zone: Null
Flow Statistics :
Flow Input statistics :
Self packets : 0
ICMP packets : 0
VPN packets : 0
Multicast packets : 0
Bytes permitted by policy : 0
Connections established : 0
Flow Output statistics:
Multicast packets : 0
Bytes permitted by policy : 0
Flow error statistics (Packets dropped due to):
Address spoofing: 0
Authentication failed: 0
Incoming NAT errors: 0
Invalid zone received packet: 0
Multiple user authentications: 0
Multiple incoming NAT: 0
No parent for a gate: 0
No one interested in self packets: 0
No minor session: 0
No more sessions: 0
No NAT gate: 0
No route present: 0
No SA for incoming SPI: 0
No tunnel found: 0
No session for a gate: 0
No zone or NULL zone binding 0
Policy denied: 0
Security association not active: 0
TCP sequence number out of window: 0
Syn-attack protection: 0
User authentication errors: 0
Protocol inet, MTU: 1492, Generation: 156, Route table: 0
Flags: Sendbcast-pkt-to-re, Protocol-Down, User-MTU, Negotiate-Address
root@anduin>
cheers
volki
Ja den Output mach mal bitte wenn die SRX am DSL hängt und sich eingewählt hat.
Als aller erstes und wichtigstes, vielen vielen dank fuer deine hilfe
Hier ist der output, ich bin einen deutlichen Schritt weiter
ich habe ein ip bekommen, das heist das aufbau zur telekom erstmal klappt, ich bekomme aber keinen ping abgesetzt
die routen
root@anduin> show route
inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, – = Last Active, * = Both
0.0.0.0/0 *[Static/5] 00:04:46, metric 0
> via pp0.0
79.253.40.105/32 *[Local/0] 00:04:46
Local via pp0.0
87.186.224.97/32 *[Direct/0] 00:04:46
> via pp0.0
192.168.123.0/24 *[Direct/0] 01:14:42
> via vlan.0
192.168.123.1/32 *[Local/0] 01:15:28
Local via vlan.0
und die config
root@anduin> show configuration routing-options
static {
route 0.0.0.0/0 {
next-hop pp0.0;
metric 0;
}
}
nach meinem beschaenkten wissen nach muesste der vom lan ins netz, oder von der juni ins netz pingen koennen. Faellt dir auf was fritte sein koennte?
und hier noch mal der pp0.0 spass
root@anduin> show interfaces pp0 extensive
Physical interface: pp0, Enabled, Physical link is Up
Interface index: 128, SNMP ifIndex: 522, Generation: 131
Type: PPPoE, Link-level type: PPPoE, MTU: 1532, Speed: Unspecified
Device flags : Present Running
Interface flags: Point-To-Point SNMP-Traps
Link type : Full-Duplex
Link flags : None
Physical info : Unspecified
Hold-times : Up 0 ms, Down 0 ms
Current address: Unspecified, Hardware address: Unspecified
Alternate link address: Unspecified
Statistics last cleared: Never
Traffic statistics:
Input bytes : 0
Output bytes : 0
Input packets: 0
Output packets: 0
Input errors:
Errors: 0, Drops: 0, Framing errors: 0, Runts: 0, Giants: 0,
Policed discards: 0, Resource errors: 0
Output errors:
Carrier transitions: 0, Errors: 0, Drops: 0, MTU errors: 0,
Resource errors: 0
Logical interface pp0.0 (Index 80) (SNMP ifIndex 531) (Generation 146)
Flags: Point-To-Point SNMP-Traps 0×0 Encapsulation: PPPoE
PPPoE:
State: SessionUp, Session ID: 4697,
Session AC name: FFMR77-se800-B222E160705192, Remote MAC address: 00:30:88:13:b9:65,
Configured AC name: None, Service name: Telekom,
Auto-reconnect timeout: 30 seconds, Idle timeout: Never,
Underlying interface: fe-0/0/0.0 (Index 79)
Traffic statistics:
Input bytes : 1600
Output bytes : 990
Input packets: 36
Output packets: 25
Local statistics:
Input bytes : 1120
Output bytes : 990
Input packets: 28
Output packets: 25
Transit statistics:
Input bytes : 480 0 bps
Output bytes : 0 0 bps
Input packets: 8 0 pps
Output packets: 0 0 pps
Keepalive settings: Interval 10 seconds, Up-count 1, Down-count 3
Keepalive statistics:
Input : 0 (last seen: never)
Output: 7 (last sent 00:00:07 ago)
LCP state: Opened
NCP state: inet: Opened, inet6: Not-configured, iso: Not-configured, mpls:
Not-configured
CHAP state: Closed
PAP state: Success
Security: Zone: Null
Flow Statistics :
Flow Input statistics :
Self packets : 0
ICMP packets : 0
VPN packets : 0
Multicast packets : 0
Bytes permitted by policy : 0
Connections established : 0
Flow Output statistics:
Multicast packets : 0
Bytes permitted by policy : 0
Flow error statistics (Packets dropped due to):
Address spoofing: 0
Authentication failed: 0
Incoming NAT errors: 0
Invalid zone received packet: 0
Multiple user authentications: 0
Multiple incoming NAT: 0
No parent for a gate: 0
No one interested in self packets: 0
No minor session: 0
No more sessions: 0
No NAT gate: 0
No route present: 0
No SA for incoming SPI: 0
No tunnel found: 0
No session for a gate: 0
No zone or NULL zone binding 0
Policy denied: 0
Security association not active: 0
TCP sequence number out of window: 0
Syn-attack protection: 0
User authentication errors: 0
Protocol inet, MTU: 1492, Generation: 156, Route table: 0
Flags: Sendbcast-pkt-to-re, User-MTU, Negotiate-Address
Addresses, Flags: Kernel Is-Preferred Is-Primary
Destination: 87.186.224.97, Local: 79.253.40.105,
Broadcast: Unspecified, Generation: 154
So auf dem ersten Blick nicht. Wenn du aus dem Netz in das Internet pingen möchtest dann brauchst nicht nur Routing sondern auch NAT und Policies. Hier könnte durchaus der Fehler liegen, was aber den Blog hier sprengen würde.
Gern kannst du dich jedoch an meine Firma nacura it-SERVICE ( http://nacura.de ) wenden, dort bekommst du professionelle Unterstützung.
MfG
Markus